summaryrefslogtreecommitdiff
path: root/sysdeps/mach/pt-thread-alloc.c
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@gnu.org>2002-11-18 22:20:58 +0000
committerNeal H. Walfield <neal@gnu.org>2002-11-18 22:20:58 +0000
commita59f26424348f0caf9a3666f9b6ac12565e425e1 (patch)
treed99c5bc66516cc566de61ba003ec3655fe9368dc /sysdeps/mach/pt-thread-alloc.c
parent92d94f2528ad27aaa1b2753f96ea95d7bb7f71d9 (diff)
2002-11-18 Neal H. Walfield <neal@cs.uml.edu>
* sysdeps/mach/pt-wakeup.c (__pthread_wakeup): Use the size of THREAD->wakeupmsg which may not be a mach_msg_header_t. * sysdeps/generic/pt-mutex-timedlock.c (__pthread_mutex_timedlock_internal): Really test for equality. * sysdeps/generic/pt-rwlock-timedrdlock.c (__pthread_rwlock_timedrdlock_internal): Likewise. * sysdeps/generic/pt-rwlock-timedwrlock.c (__pthread_rwlock_timedwrlock_internal): Likewise. * sysdeps/generic/pt-cond-timedwait.c (__pthread_cond_timedwait_internal): On timeout, remove our thread structure from the wait queue if necessary. * sysdeps/l4/pt-start.c (__pthread_start): Call L4_Myself, not __mach_thread_self. * sysdeps/mach/hurd/i386/pt-setup.c: Include <mach.h>. (__pthread_setup): Do not leak references from __mach_thread_self. * sysdeps/mach/hurd/pt-docancel.c (__pthread_do_cancel): Likewise. * sysdeps/mach/hurd/pt-sysdep.h (_pthread_self): Likewise. * sysdeps/mach/pt-thread-alloc.c (__pthread_thread_alloc): Likewise. * sysdeps/mach/pt-thread-start.c (__pthread_thread_start): Likewise. * sysdeps/mach/pt-start.c: Remove dead file.
Diffstat (limited to 'sysdeps/mach/pt-thread-alloc.c')
-rw-r--r--sysdeps/mach/pt-thread-alloc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/mach/pt-thread-alloc.c b/sysdeps/mach/pt-thread-alloc.c
index af92953..a191c71 100644
--- a/sysdeps/mach/pt-thread-alloc.c
+++ b/sysdeps/mach/pt-thread-alloc.c
@@ -86,6 +86,8 @@ __pthread_thread_alloc (struct __pthread *thread)
{
assert (__pthread_total == 0);
thread->kernel_thread = __mach_thread_self ();
+ /* We implicitly hold a reference. */
+ __mach_port_deallocate (__mach_task_self (), thread->kernel_thread);
}
else
{