diff options
Diffstat (limited to 'libpthread/sysdeps/viengoos/pt-block.c')
-rw-r--r-- | libpthread/sysdeps/viengoos/pt-block.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/libpthread/sysdeps/viengoos/pt-block.c b/libpthread/sysdeps/viengoos/pt-block.c index 2315b1c..548cc3f 100644 --- a/libpthread/sysdeps/viengoos/pt-block.c +++ b/libpthread/sysdeps/viengoos/pt-block.c @@ -26,5 +26,17 @@ void __pthread_block (struct __pthread *thread) { - futex_wait (&thread->threadid, thread->threadid); + assert (thread->lock_message_buffer); + + struct hurd_message_buffer *mb = thread->lock_message_buffer; +#ifndef NDEBUG + /* Try to detect recursive locks, which we don't handle. */ + thread->lock_message_buffer = NULL; +#endif + + futex_wait_using (mb, &thread->threadid, thread->threadid); + +#ifndef NDEBUG + thread->lock_message_buffer = mb; +#endif } |