summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/cgo/freebsd_386.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/runtime/cgo/freebsd_386.c')
-rw-r--r--src/pkg/runtime/cgo/freebsd_386.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/pkg/runtime/cgo/freebsd_386.c b/src/pkg/runtime/cgo/freebsd_386.c
index d08e1dee8..ae53201b4 100644
--- a/src/pkg/runtime/cgo/freebsd_386.c
+++ b/src/pkg/runtime/cgo/freebsd_386.c
@@ -20,11 +20,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*