diff options
Diffstat (limited to 'src/pkg/runtime/cgo/darwin_amd64.c')
-rw-r--r-- | src/pkg/runtime/cgo/darwin_amd64.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/pkg/runtime/cgo/darwin_amd64.c b/src/pkg/runtime/cgo/darwin_amd64.c index 38cd80a6f..3471044c0 100644 --- a/src/pkg/runtime/cgo/darwin_amd64.c +++ b/src/pkg/runtime/cgo/darwin_amd64.c @@ -83,11 +83,16 @@ libcgo_sys_thread_start(ThreadStart *ts) pthread_attr_t attr; pthread_t p; size_t size; + int err; pthread_attr_init(&attr); pthread_attr_getstacksize(&attr, &size); ts->g->stackguard = size; - pthread_create(&p, &attr, threadentry, ts); + err = pthread_create(&p, &attr, threadentry, ts); + if (err != 0) { + fprintf(stderr, "runtime/cgo: pthread_create failed: %s\n", strerror(err)); + abort(); + } } static void* |