diff options
Diffstat (limited to 'lib/libpthread/thread/thr_create.c')
-rw-r--r-- | lib/libpthread/thread/thr_create.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libpthread/thread/thr_create.c b/lib/libpthread/thread/thr_create.c index 3dcd944..c9c6c9f 100644 --- a/lib/libpthread/thread/thr_create.c +++ b/lib/libpthread/thread/thr_create.c @@ -40,6 +40,7 @@ #include <machine/reg.h> #include <pthread.h> #include "pthread_private.h" +#include "libc_private.h" int _thread_create(pthread_t * thread, const pthread_attr_t * attr, @@ -254,6 +255,12 @@ pthread_create(pthread_t * thread, const pthread_attr_t * attr, int ret = 0; /* + * Locking functions in libc are required when there are + * threads other than the initial thread. + */ + __isthreaded = 1; + + /* * Call the low level thread creation function which allows a parent * thread to be specified: */ |