diff options
author | jasone <jasone@FreeBSD.org> | 2001-05-20 23:08:33 +0000 |
---|---|---|
committer | jasone <jasone@FreeBSD.org> | 2001-05-20 23:08:33 +0000 |
commit | adf603d4b170a8622047e0fd342070ac6f07caf4 (patch) | |
tree | c37f9e05a6d81f226bfef98090c73e613802b9c7 /lib/libpthread/thread/thr_create.c | |
parent | cdb5d97b478a3e4f97dd6c0cd43105d0951daed5 (diff) | |
download | FreeBSD-src-adf603d4b170a8622047e0fd342070ac6f07caf4.zip FreeBSD-src-adf603d4b170a8622047e0fd342070ac6f07caf4.tar.gz |
Instead of using a join queue for each thread, use a single pointer to
keep track of a joiner. POSIX only supports a single joiner, so this
simplification is acceptable.
At the same time, make sure to mark a joined thread as detached so that
its resources can be freed.
Reviewed by: deischen
PR: 24345
Diffstat (limited to 'lib/libpthread/thread/thr_create.c')
-rw-r--r-- | lib/libpthread/thread/thr_create.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libpthread/thread/thr_create.c b/lib/libpthread/thread/thr_create.c index f1a3473..40f5364 100644 --- a/lib/libpthread/thread/thr_create.c +++ b/lib/libpthread/thread/thr_create.c @@ -235,8 +235,8 @@ _pthread_create(pthread_t * thread, const pthread_attr_t * attr, new_thread->active_priority = new_thread->base_priority; new_thread->inherited_priority = 0; - /* Initialise the join queue for the new thread: */ - TAILQ_INIT(&(new_thread->join_queue)); + /* Initialize joiner to NULL (no joiner): */ + new_thread->joiner = NULL; /* Initialize the mutex queue: */ TAILQ_INIT(&new_thread->mutexq); |