summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMike Makonnen <mtm@FreeBSD.org>2003-05-29 20:49:17 +0000
committerMike Makonnen <mtm@FreeBSD.org>2003-05-29 20:49:17 +0000
commit0e335eaeb534cd27e7d025c44689eff801fecc60 (patch)
tree54512df8c62864c58bf39a1518635270e23748d1 /lib
parentb3cdf7ae2eb9a89e6f906aad132866185cf4dfe8 (diff)
Notes
Diffstat (limited to 'lib')
-rw-r--r--lib/libthr/arch/i386/i386/_setcurthread.c2
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 2cd27caeee24..81db3e9889cb 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);
}