summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/cgocall.c
diff options
context:
space:
mode:
authorMichael Stapelberg <stapelberg@debian.org>2014-09-26 23:20:01 +0200
committerMichael Stapelberg <stapelberg@debian.org>2014-09-26 23:20:01 +0200
commitf4fa1ef6e6ccd9264db61c6400528158e5913bda (patch)
tree0d9f077025369138011800c470f68abf72833b31 /src/pkg/runtime/cgocall.c
parent64f344c0c94601934187163f7b353d009dc1b63f (diff)
downloadgolang-upstream/1.3.2.tar.gz
Imported Upstream version 1.3.2upstream/1.3.2
Diffstat (limited to 'src/pkg/runtime/cgocall.c')
-rw-r--r--src/pkg/runtime/cgocall.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pkg/runtime/cgocall.c b/src/pkg/runtime/cgocall.c
index 7b2ec26f3..75d3850ef 100644
--- a/src/pkg/runtime/cgocall.c
+++ b/src/pkg/runtime/cgocall.c
@@ -234,14 +234,18 @@ void runtime·cgocallbackg1(void);
void
runtime·cgocallbackg(void)
{
+ uintptr pc, sp;
+
if(g != m->curg) {
runtime·prints("runtime: bad g in cgocallback");
runtime·exit(2);
}
+ pc = g->syscallpc;
+ sp = g->syscallsp;
runtime·exitsyscall(); // coming out of cgo call
runtime·cgocallbackg1();
- runtime·entersyscall(); // going back to cgo call
+ runtime·reentersyscall((void*)pc, sp); // going back to cgo call
}
void