diff options
author | Neal H. Walfield <neal@gnu.org> | 2008-06-22 09:16:45 +0000 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gnu.org> | 2009-04-07 23:18:00 +0200 |
commit | 7b6f91d24d9dcf1f87ab66866bcad5e35afc9b98 (patch) | |
tree | 4086803a96a712cb8368115cfa0af29ae93c02c7 /sysdeps | |
parent | 6f18deca8f1d582f2d870c1431a83d1e47a3eac2 (diff) |
viengoos/
2008-06-22 Neal H. Walfield <neal@gnu.org>
* thread.h: Include "list.h".
(struct thread) [! NDEBUG]: Add field futex_waiter_node.
[! NDEBUG]: Instantiate the futex_waiter list class.
(futex_waiters) [! NDEBUG]: Declare.
* server.c (futex_waiters) [! NDEBUG]: New variable.
(server_loop) [! NDEBUG]: If we don't get an RPC for a while,
dequeue all thread's enqueued on FUTEX_WAITERS and return EDEADLK.
When blocking a thread on a futex, add THREAD to FUTEX_WAITERS.
* object.c (object_wait_queue_dequeue) [! NDEBUG]: If
THREAD->WAIT_REASON is THREAD_WAIT_FUTEX, unlink THREAD from
FUTEX_WAITERS.
hurd/
2008-06-22 Neal H. Walfield <neal@gnu.org>
* futex.h [! RM_INTERN]: Include <errno.h>.
(futex_wait): On error, set ERRNO and return -1.
(futex_timed_wait): Likewise.
(futex_wake): Likewise.
* mutex.h (ss_mutex_lock): If FUTEX_WAIT returns failure, print
some debugging information.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/generic/pt-mutex-unlock.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sysdeps/generic/pt-mutex-unlock.c b/sysdeps/generic/pt-mutex-unlock.c index 492dfcb5..d2a42570 100644 --- a/sysdeps/generic/pt-mutex-unlock.c +++ b/sysdeps/generic/pt-mutex-unlock.c @@ -37,7 +37,12 @@ __pthread_mutex_unlock (pthread_mutex_t *mutex) if (_pthread_self ()) { assert (mutex->owner); - assert (mutex->owner == _pthread_self ()); + assertx (mutex->owner == _pthread_self (), + "%p(%x) != %p(%x)", + mutex->owner, + ((struct __pthread *) mutex->owner)->threadid, + _pthread_self (), + _pthread_self ()->threadid); mutex->owner = NULL; } #endif |