aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/cgocall.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/runtime/cgocall.go')
-rw-r--r--src/pkg/runtime/cgocall.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/runtime/cgocall.go b/src/pkg/runtime/cgocall.go
index d44b832dfa..1037c5dc21 100644
--- a/src/pkg/runtime/cgocall.go
+++ b/src/pkg/runtime/cgocall.go
@@ -101,7 +101,7 @@ func cgocall_errno(fn, arg unsafe.Pointer) int32 {
// Create an extra M for callbacks on threads not created by Go on first cgo call.
if needextram == 1 && cas(&needextram, 1, 0) {
- newextram()
+ onM(newextram)
}
/*
@@ -188,7 +188,7 @@ func cgocallbackg1() {
gp := getg()
if gp.m.needextram {
gp.m.needextram = false
- newextram()
+ onM(newextram)
}
// Add entry to defer stack in case of panic.