diff options
Diffstat (limited to 'sysdeps/mach')
-rw-r--r-- | sysdeps/mach/hurd/pt-docancel.c | 2 | ||||
-rw-r--r-- | sysdeps/mach/pt-thread-alloc.c | 4 | ||||
-rw-r--r-- | sysdeps/mach/pt-wakeup.c | 4 |
3 files changed, 8 insertions, 2 deletions
diff --git a/sysdeps/mach/hurd/pt-docancel.c b/sysdeps/mach/hurd/pt-docancel.c index 105c6fd..b3a5507 100644 --- a/sysdeps/mach/hurd/pt-docancel.c +++ b/sysdeps/mach/hurd/pt-docancel.c @@ -36,6 +36,8 @@ __pthread_do_cancel (struct __pthread *p) assert (p->cancel_pending == 1); assert (p->cancel_state == PTHREAD_CANCEL_ENABLE); + __pthread_mutex_unlock (&p->cancel_lock); + ktid = __mach_thread_self (); me = p->kernel_thread == ktid; __mach_port_deallocate (__mach_task_self (), ktid); diff --git a/sysdeps/mach/pt-thread-alloc.c b/sysdeps/mach/pt-thread-alloc.c index 3d7c046..794f63e 100644 --- a/sysdeps/mach/pt-thread-alloc.c +++ b/sysdeps/mach/pt-thread-alloc.c @@ -55,6 +55,10 @@ create_wakeupmsg (struct __pthread *thread) return EAGAIN; } + /* No need to queue more than one wakeup message on this port. */ + mach_port_set_qlimit (__mach_task_self (), + thread->wakeupmsg.msgh_remote_port, 1); + return 0; } diff --git a/sysdeps/mach/pt-wakeup.c b/sysdeps/mach/pt-wakeup.c index 4920d10..95fdbf9 100644 --- a/sysdeps/mach/pt-wakeup.c +++ b/sysdeps/mach/pt-wakeup.c @@ -31,8 +31,8 @@ __pthread_wakeup (struct __pthread *thread) { error_t err; - err = __mach_msg (&thread->wakeupmsg, MACH_SEND_MSG, + err = __mach_msg (&thread->wakeupmsg, MACH_SEND_MSG | MACH_SEND_TIMEOUT, sizeof (thread->wakeupmsg), 0, MACH_PORT_NULL, - MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); + 0 , MACH_PORT_NULL); assert_perror (err); } |