aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/cgo.go
diff options
context:
space:
mode:
authorDavid Crawshaw <crawshaw@golang.org>2015-03-25 07:10:45 -0400
committerDavid Crawshaw <crawshaw@golang.org>2015-03-26 11:12:25 +0000
commite9d9d0befc634f6e9f906b5ef7476fbd7ebd25e3 (patch)
tree831077a9975e227e4253e2647201cec9f6c118e5 /src/runtime/cgo.go
parentc5c6c3ab5728ecbecac69788eefa5fb185c0b72f (diff)
downloadgo-e9d9d0befc634f6e9f906b5ef7476fbd7ebd25e3.tar.gz
go-e9d9d0befc634f6e9f906b5ef7476fbd7ebd25e3.zip
runtime, runtime/cgo: make needextram a bool
Also invert it, which means it no longer needs to cross the cgo package boundary. Change-Id: I393cd073bda02b591a55d6bc6b8bb94970ea71cd Reviewed-on: https://go-review.googlesource.com/8082 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/runtime/cgo.go')
-rw-r--r--src/runtime/cgo.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/runtime/cgo.go b/src/runtime/cgo.go
index 7e6b253af9..5dc83c0be1 100644
--- a/src/runtime/cgo.go
+++ b/src/runtime/cgo.go
@@ -21,3 +21,10 @@ var (
_cgo_free unsafe.Pointer
_cgo_thread_start unsafe.Pointer
)
+
+// iscgo is set to true by the runtime/cgo package
+var iscgo bool
+
+// cgoHasExtraM is set on startup when an extra M is created for cgo.
+// The extra M must be created before any C/C++ code calls cgocallback.
+var cgoHasExtraM bool