diff options
Diffstat (limited to 'lib/libthr/arch')
-rw-r--r-- | lib/libthr/arch/i386/i386/_setcurthread.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libthr/arch/i386/i386/_setcurthread.c b/lib/libthr/arch/i386/i386/_setcurthread.c index 2cd27ca..81db3e9 100644 --- a/lib/libthr/arch/i386/i386/_setcurthread.c +++ b/lib/libthr/arch/i386/i386/_setcurthread.c @@ -111,6 +111,8 @@ _set_curthread(ucontext_t *uc, struct pthread *thr, int *err) if (ldt_free == NULL) { /* Concurrent thread limit reached */ *err = curthread->error = EAGAIN; + if (thr != _thread_initial) + _SPINUNLOCK(&ldt_lock); return (NULL); } |