summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/cgocall.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-10-12 10:26:38 -0700
committerRuss Cox <rsc@golang.org>2009-10-12 10:26:38 -0700
commitefa39fa7cc4e0413ee534342783f032276b6514d (patch)
treeda51e7592c895d32c8acf0bed84cdd5cfa1dbc01 /src/pkg/runtime/cgocall.c
parent407480ed58c58d0e334acec1ffd5cf237e61168f (diff)
downloadgolang-efa39fa7cc4e0413ee534342783f032276b6514d.tar.gz
stack overflow debugging and fix.
* in 6l, -K already meant check for stack underflow. add -KK to mean double-check stack overflows even in nosplit functions. * comment out print locks; they deadlock too easily but are still useful to put back for special occasions. * let runcgo assembly switch to scheduler stack without involving scheduler directly. because runcgo gets called from matchmg, it is too hard to keep it from being called on other stacks. R=r DELTA=94 (65 added, 18 deleted, 11 changed) OCL=35591 CL=35604
Diffstat (limited to 'src/pkg/runtime/cgocall.c')
-rw-r--r--src/pkg/runtime/cgocall.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/pkg/runtime/cgocall.c b/src/pkg/runtime/cgocall.c
index a47560395..70382ceee 100644
--- a/src/pkg/runtime/cgocall.c
+++ b/src/pkg/runtime/cgocall.c
@@ -25,10 +25,7 @@ cgocall(void (*fn)(void*), void *arg)
* foreign code.
*/
sys·entersyscall();
- g->cgofn = fn;
- g->cgoarg = arg;
- g->status = Gcgocall;
- gosched();
+ runcgo(fn, arg);
sys·exitsyscall();
return;
}