github.com/shijuvar/go@v0.0.0-20141209052335-e8f13700b70c/src/runtime/cgo/iscgo.go (about)

     1  // Copyright 2010 The Go Authors.  All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // The runtime package contains an uninitialized definition
     6  // for runtime·iscgo.  Override it to tell the runtime we're here.
     7  // There are various function pointers that should be set too,
     8  // but those depend on dynamic linker magic to get initialized
     9  // correctly, and sometimes they break.  This variable is a
    10  // backup: it depends only on old C style static linking rules.
    11  
    12  package cgo
    13  
    14  import _ "unsafe" // for go:linkname
    15  
    16  //go:linkname _iscgo runtime.iscgo
    17  var _iscgo bool = true
    18  
    19  //go:linkname _needextram runtime.needextram
    20  var _needextram uint32 = 1 // create an extra M on first cgo call