summaryrefslogtreecommitdiffstats
path: root/lib/libc_r/uthread/uthread_create.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc_r/uthread/uthread_create.c')
-rw-r--r--lib/libc_r/uthread/uthread_create.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libc_r/uthread/uthread_create.c b/lib/libc_r/uthread/uthread_create.c
index c7ddeb2..4169461 100644
--- a/lib/libc_r/uthread/uthread_create.c
+++ b/lib/libc_r/uthread/uthread_create.c
@@ -223,6 +223,9 @@ pthread_create(pthread_t * thread, const pthread_attr_t * attr,
void
_thread_start(void)
{
+ /* We just left the scheduler via longjmp: */
+ _thread_kern_in_sched = 0;
+
/* Run the current thread's start routine with argument: */
pthread_exit(_thread_run->start_routine(_thread_run->arg));
OpenPOWER on IntegriCloud