diff options
author | neal <neal> | 2007-12-12 16:33:37 +0000 |
---|---|---|
committer | neal <neal> | 2007-12-12 16:33:37 +0000 |
commit | 3e507f74c3c12389a24a24345f93d5fbeb7a63f4 (patch) | |
tree | 4145780374a1b4c3b04b736c9b6a00bebdef7cd0 /libpthread/sysdeps | |
parent | 6a1ac8c6e68dd5998e22ac189940fb78c1a5b22e (diff) |
2007-12-12 Neal H. Walfield <neal@gnu.org>
* sysdeps/l4/pt-block.c (__pthread_block): Clear the acceptor.
Improve debugging output.
* sysdeps/l4/pt-wakeup.c (__pthread_wakeup): Load an empty message.
Improve debugging output.
Diffstat (limited to 'libpthread/sysdeps')
-rw-r--r-- | libpthread/sysdeps/l4/pt-block.c | 12 | ||||
-rw-r--r-- | libpthread/sysdeps/l4/pt-wakeup.c | 13 |
2 files changed, 18 insertions, 7 deletions
diff --git a/libpthread/sysdeps/l4/pt-block.c b/libpthread/sysdeps/l4/pt-block.c index df3fe85..e92ce91 100644 --- a/libpthread/sysdeps/l4/pt-block.c +++ b/libpthread/sysdeps/l4/pt-block.c @@ -27,16 +27,20 @@ void __pthread_block (struct __pthread *thread) { - debug (5, "%x.%x blocking", - l4_thread_no (thread->threadid), l4_version (thread->threadid)); + debug (5, "%x.%x/%x blocking", + l4_thread_no (thread->threadid), l4_version (thread->threadid), + thread->threadid); + l4_accept (L4_UNTYPED_WORDS_ACCEPTOR); l4_msg_tag_t tag = l4_receive (l4_anythread); if (l4_ipc_failed (tag)) { int err = l4_error_code (); - debug (1, "%x.%x failed to block: %s (%d)", + debug (1, "%x.%x failed to block: %d, offset: %x", l4_thread_no (l4_myself ()), l4_version (l4_myself ()), - l4_strerror (err), err); + (l4_error_code () >> 1) & 0x7, + l4_error_code () >> 4); + assert (! l4_ipc_failed (tag)); } else debug (5, "%x.%x unblocked", diff --git a/libpthread/sysdeps/l4/pt-wakeup.c b/libpthread/sysdeps/l4/pt-wakeup.c index 7ecc938..de37846 100644 --- a/libpthread/sysdeps/l4/pt-wakeup.c +++ b/libpthread/sysdeps/l4/pt-wakeup.c @@ -27,9 +27,16 @@ void __pthread_wakeup (struct __pthread *thread) { - debug (5, "%x.%x waking %x.%x", - l4_thread_no (l4_myself ()), l4_version (l4_myself ()), - l4_thread_no (thread->threadid), l4_version (thread->threadid)); + debug (5, "%x.%x/%x waking %x.%x/%x", + l4_thread_no (l4_myself ()), l4_version (l4_myself ()), l4_myself (), + l4_thread_no (thread->threadid), l4_version (thread->threadid), + thread->threadid); + + /* Signal the waiter. */ + l4_msg_t msg; + l4_msg_clear (msg); + l4_msg_set_untyped_words (msg, 0); + l4_msg_load (msg); l4_msg_tag_t tag = l4_send (thread->threadid); if (l4_ipc_failed (tag)) |