diff options
author | Marin Ramesa <mpr@hi.t-com.hr> | 2013-12-16 00:18:41 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-12-16 07:43:56 +0100 |
commit | f3593b77a6ab8550c119e0617e3dee4abf144533 (patch) | |
tree | 16b69043695f7e84b152c47f9f36df6e7bd78532 /kern/sched_prim.c | |
parent | 4e639015436ec69fc161da2eb061073701483680 (diff) | |
download | gnumach-f3593b77a6ab8550c119e0617e3dee4abf144533.tar.gz gnumach-f3593b77a6ab8550c119e0617e3dee4abf144533.tar.bz2 gnumach-f3593b77a6ab8550c119e0617e3dee4abf144533.zip |
kern: quiet GCC warnings about set but unused variables
* kern/lock.h (simple_lock_data_empty): Define.
(decl_simple_lock_data, simple_unlock): Likewise.
* kern/sched_prim.c (lock): Declare.
[MACH_SLOCKS]: Remove #ifs.
* kern/task.c (task_lock, task_unlock): Remove address operator.
Diffstat (limited to 'kern/sched_prim.c')
-rw-r--r-- | kern/sched_prim.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/kern/sched_prim.c b/kern/sched_prim.c index ec041fc8..8aad1462 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)) { |