summaryrefslogtreecommitdiff
path: root/misc/cgo/test/callback.go
diff options
context:
space:
mode:
Diffstat (limited to 'misc/cgo/test/callback.go')
-rw-r--r--misc/cgo/test/callback.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/misc/cgo/test/callback.go b/misc/cgo/test/callback.go
index ef852561b..e6a1462b3 100644
--- a/misc/cgo/test/callback.go
+++ b/misc/cgo/test/callback.go
@@ -6,14 +6,12 @@ package cgotest
/*
void callback(void *f);
-void callGoFoo(void) {
- extern void goFoo(void);
- goFoo();
-}
+void callGoFoo(void);
*/
import "C"
import (
+ "./backdoor"
"runtime"
"testing"
"unsafe"
@@ -43,7 +41,7 @@ func testCallbackGC(t *testing.T) {
nestedCall(runtime.GC)
}
-func lockedOSThread() bool // in runtime.c
+var lockedOSThread = backdoor.LockedOSThread
func testCallbackPanic(t *testing.T) {
// Make sure panic during callback unwinds properly.