diff options
Diffstat (limited to 'ipc/ipc_mqueue.c')
-rw-r--r-- | ipc/ipc_mqueue.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ipc/ipc_mqueue.c b/ipc/ipc_mqueue.c index 9138aec..22d8f43 100644 --- a/ipc/ipc_mqueue.c +++ b/ipc/ipc_mqueue.c @@ -88,6 +88,9 @@ ipc_mqueue_move( ipc_kmsg_t kmsg, next; ipc_thread_t th; + assert(have_imq_lock(dest)); + assert(have_imq_lock(source)); + oldq = &source->imq_messages; newq = &dest->imq_messages; blockedq = &dest->imq_threads; @@ -146,6 +149,8 @@ ipc_mqueue_changed( { ipc_thread_t th; + assert(have_imq_lock(mqueue)); + while ((th = ipc_thread_dequeue(&mqueue->imq_threads)) != ITH_NULL) { th->ith_state = mr; thread_go(th); @@ -535,6 +540,8 @@ ipc_mqueue_receive( if (resume) goto after_thread_block; + assert(have_imq_lock(mqueue)); + for (;;) { kmsg = ipc_kmsg_queue_first(kmsgs); if (kmsg != IKM_NULL) { |