diff options
| author | Daniel Eischen <deischen@FreeBSD.org> | 2003-04-28 23:56:12 +0000 |
|---|---|---|
| committer | Daniel Eischen <deischen@FreeBSD.org> | 2003-04-28 23:56:12 +0000 |
| commit | 55613576f5c40d62fecb4ab76f012917fc399c3e (patch) | |
| tree | 90f4ce3660289c401aab5d0a2c4f105e5aa3e877 /lib/libpthread/thread/thr_create.c | |
| parent | 6a9ccd81fefc8a10772034a7e4955fccdacc347f (diff) | |
Notes
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 deb26de438d9..4c65d3c18e1a 100644 --- a/lib/libpthread/thread/thr_create.c +++ b/lib/libpthread/thread/thr_create.c @@ -297,6 +297,13 @@ _pthread_create(pthread_t * thread, const pthread_attr_t * attr, * pair if necessary. */ ret = _thr_schedule_add(curthread, new_thread); + if (ret != 0) { + KSE_LOCK_ACQUIRE(curthread->kse, + &_thread_list_lock); + THR_LIST_REMOVE(new_thread); + KSE_LOCK_RELEASE(curthread->kse, + &_thread_list_lock); + } _kse_critical_leave(crit); if (ret != 0) free_thread(curthread, new_thread); |
