diff options
Diffstat (limited to 'src/runtime/cgocall.go')
-rw-r--r-- | src/runtime/cgocall.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/runtime/cgocall.go b/src/runtime/cgocall.go index 8b00f3de57..a944723882 100644 --- a/src/runtime/cgocall.go +++ b/src/runtime/cgocall.go @@ -236,6 +236,9 @@ func cgocallbackg(fn, frame unsafe.Pointer, ctxt uintptr) { savedpc := gp.syscallpc exitsyscall() // coming out of cgo call gp.m.incgo = false + if gp.m.isextra { + gp.m.isExtraInC = false + } osPreemptExtExit(gp.m) @@ -246,6 +249,9 @@ func cgocallbackg(fn, frame unsafe.Pointer, ctxt uintptr) { // This is enforced by checking incgo in the schedule function. gp.m.incgo = true + if gp.m.isextra { + gp.m.isExtraInC = true + } if gp.m != checkm { throw("m changed unexpectedly in cgocallbackg") |