diff options
Diffstat (limited to 'src/pkg/runtime/cgo/darwin_386.c')
-rw-r--r-- | src/pkg/runtime/cgo/darwin_386.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/pkg/runtime/cgo/darwin_386.c b/src/pkg/runtime/cgo/darwin_386.c index 13184f321..6d4e259be 100644 --- a/src/pkg/runtime/cgo/darwin_386.c +++ b/src/pkg/runtime/cgo/darwin_386.c @@ -113,11 +113,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* |