diff options
| author | Russ Cox <rsc@golang.org> | 2010-12-08 13:53:30 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2010-12-08 13:53:30 -0500 |
| commit | 9042c2ce6840a7679739e6ec6ff59b57db30c459 (patch) | |
| tree | 7b3beaba4f1dbfdda1d7b130a707b948dbcd029b /src/pkg/runtime/proc.c | |
| parent | cf42a455878329d827852c58c5394f602e459666 (diff) | |
| download | go-9042c2ce6840a7679739e6ec6ff59b57db30c459.tar.xz | |
runtime/cgo: runtime changes for new cgo
Formerly known as libcgo.
Almost no code here is changing; the diffs
are shown relative to the originals in libcgo.
R=r
CC=golang-dev
https://golang.org/cl/3420043
Diffstat (limited to 'src/pkg/runtime/proc.c')
| -rw-r--r-- | src/pkg/runtime/proc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c index ff8673a314..3d5ee24c49 100644 --- a/src/pkg/runtime/proc.c +++ b/src/pkg/runtime/proc.c @@ -8,6 +8,8 @@ #include "malloc.h" #include "os.h" +bool runtime·iscgo; + static void unwindstack(G*, byte*); typedef struct Sched Sched; @@ -426,8 +428,11 @@ matchmg(void) runtime·allm = m; m->id = runtime·sched.mcount++; - if(libcgo_thread_start != nil) { + if(runtime·iscgo) { CgoThreadStart ts; + + if(libcgo_thread_start == nil) + runtime·throw("libcgo_thread_start missing"); // pthread_create will make us a stack. m->g0 = runtime·malg(-1); ts.m = m; |
