diff options
| author | Jason Evans <jasone@FreeBSD.org> | 2001-06-27 11:41:15 +0000 |
|---|---|---|
| committer | Jason Evans <jasone@FreeBSD.org> | 2001-06-27 11:41:15 +0000 |
| commit | 651974ee9200d32da898bb338dd0471914e8409a (patch) | |
| tree | 463b1f41916ef7a7abac0e3d8230ce498dcde63c /lib/libpthread/thread/thr_find_thread.c | |
| parent | 5f36700a321043f061e164d5047bc1ca00f8d228 (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_find_thread.c')
| -rw-r--r-- | lib/libpthread/thread/thr_find_thread.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/lib/libpthread/thread/thr_find_thread.c b/lib/libpthread/thread/thr_find_thread.c index 861c4cb765b7..e6e9294f2111 100644 --- a/lib/libpthread/thread/thr_find_thread.c +++ b/lib/libpthread/thread/thr_find_thread.c @@ -64,35 +64,3 @@ _find_thread(pthread_t pthread) /* Return zero if the thread exists: */ return ((pthread1 != NULL) ? 0:ESRCH); } - -/* Find a thread in the linked list of dead threads: */ -int -_find_dead_thread(pthread_t pthread) -{ - pthread_t pthread1; - - /* Check if the caller has specified an invalid thread: */ - if (pthread == NULL || pthread->magic != PTHREAD_MAGIC) - /* Invalid thread: */ - return(EINVAL); - - /* - * Lock the garbage collector mutex to ensure that the garbage - * collector is not using the dead thread list. - */ - if (pthread_mutex_lock(&_gc_mutex) != 0) - PANIC("Cannot lock gc mutex"); - - /* Search for the specified thread: */ - TAILQ_FOREACH(pthread1, &_dead_list, dle) { - if (pthread1 == pthread) - break; - } - - /* Unlock the garbage collector mutex: */ - if (pthread_mutex_unlock(&_gc_mutex) != 0) - PANIC("Cannot lock gc mutex"); - - /* Return zero if the thread exists: */ - return ((pthread1 != NULL) ? 0:ESRCH); -} |
