From b51f047c28142cdfb7b24641006d0afdcf399292 Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Sun, 16 Aug 2015 02:18:47 +0200 Subject: codify locking contracts Conflicts: vm/vm_page.h --- kern/exception.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'kern') diff --git a/kern/exception.c b/kern/exception.c index 63a63d6..5338274 100644 --- a/kern/exception.c +++ b/kern/exception.c @@ -454,6 +454,8 @@ exception_raise( (sizeof(struct mach_exception) <= receiver->ith_msize) && ((receiver->ith_option & MACH_RCV_NOTIFY) == 0))) || !thread_handoff(self, exception_raise_continue, receiver)) { + imq_lock_steal(reply_mqueue); + imq_lock_steal(dest_mqueue); imq_unlock(reply_mqueue); imq_unlock(dest_mqueue); goto slow_exception_raise; @@ -461,6 +463,8 @@ exception_raise( counter(c_exception_raise_block++); assert(current_thread() == receiver); + imq_lock_steal(reply_mqueue); + imq_lock_steal(dest_mqueue); /* * We need to finish preparing self for its -- cgit v1.2.3