summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/cgo/darwin_386.c
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-07-08 09:16:22 +0200
committerOndřej Surý <ondrej@sury.org>2011-07-08 09:52:32 +0200
commit85cafef129c3826b0c5e290c89cfc7251fba43d5 (patch)
treee59b124753eb1eec194ec682a7815c401388f10d /src/pkg/runtime/cgo/darwin_386.c
parent67c487c4bd0fc91c2ce5972886d108e0d2939064 (diff)
downloadgolang-85cafef129c3826b0c5e290c89cfc7251fba43d5.tar.gz
Imported Upstream version 2011.07.07
Diffstat (limited to 'src/pkg/runtime/cgo/darwin_386.c')
-rw-r--r--src/pkg/runtime/cgo/darwin_386.c7
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*