summaryrefslogtreecommitdiff
path: root/sysdeps/generic
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@gnu.org>2008-06-22 09:16:45 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-04-07 23:18:00 +0200
commit7a69a458fe11877a7b162191a6c583d7c6bd764f (patch)
tree40a25ad357efedefd8df01d2ced0bac71dab041c /sysdeps/generic
parent9eb270404ceced4a2dc49d875c0b4e674e0b51d4 (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/generic')
-rw-r--r--sysdeps/generic/pt-mutex-unlock.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sysdeps/generic/pt-mutex-unlock.c b/sysdeps/generic/pt-mutex-unlock.c
index 492dfcb..d2a4257 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