summaryrefslogtreecommitdiff
path: root/kern/sched_prim.c
diff options
context:
space:
mode:
Diffstat (limited to 'kern/sched_prim.c')
-rw-r--r--kern/sched_prim.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/kern/sched_prim.c b/kern/sched_prim.c
index ec041fc..8aad146 100644
--- a/kern/sched_prim.c
+++ b/kern/sched_prim.c
@@ -226,9 +226,7 @@ void assert_wait(
queue_t q;
int index;
thread_t thread;
-#if MACH_SLOCKS
- simple_lock_t lock;
-#endif /* MACH_SLOCKS */
+ decl_simple_lock_data( , *lock);
spl_t s;
thread = current_thread();
@@ -240,9 +238,7 @@ void assert_wait(
if (event != 0) {
index = wait_hash(event);
q = &wait_queue[index];
-#if MACH_SLOCKS
lock = &wait_lock[index];
-#endif /* MACH_SLOCKS */
simple_lock(lock);
thread_lock(thread);
enqueue_tail(q, &(thread->links));
@@ -284,9 +280,7 @@ void clear_wait(
{
int index;
queue_t q;
-#if MACH_SLOCKS
- simple_lock_t lock;
-#endif /* MACH_SLOCKS */
+ decl_simple_lock_data( , *lock);
event_t event;
spl_t s;
@@ -306,9 +300,7 @@ void clear_wait(
thread_unlock(thread);
index = wait_hash(event);
q = &wait_queue[index];
-#if MACH_SLOCKS
lock = &wait_lock[index];
-#endif /* MACH_SLOCKS */
simple_lock(lock);
/*
* If the thread is still waiting on that event,
@@ -387,18 +379,14 @@ void thread_wakeup_prim(
queue_t q;
int index;
thread_t thread, next_th;
-#if MACH_SLOCKS
- simple_lock_t lock;
-#endif /* MACH_SLOCKS */
+ decl_simple_lock_data( , *lock);
spl_t s;
int state;
index = wait_hash(event);
q = &wait_queue[index];
s = splsched();
-#if MACH_SLOCKS
lock = &wait_lock[index];
-#endif /* MACH_SLOCKS */
simple_lock(lock);
thread = (thread_t) queue_first(q);
while (!queue_end(q, (queue_entry_t)thread)) {