diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-09-07 14:46:37 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-09-08 15:04:10 +0200 |
commit | febc88c5948f81114f64c3412011d695aecae233 (patch) | |
tree | 8b3c9568f528b048ff61fc042f8e8b6f466c40bb /include | |
parent | d56557af19867edb8c0e96f8e26399698a08857f (diff) | |
download | linux-febc88c5948f81114f64c3412011d695aecae233.tar.bz2 |
semaphore: Add DEFINE_SEMAPHORE
The full cleanup of init_MUTEX[_LOCKED] and DECLARE_MUTEX has not been
done. Some of the users are real semaphores and we should name them as
such instead of confusing everyone with "MUTEX".
Provide the infrastructure to get finally rid of init_MUTEX[_LOCKED]
and DECLARE_MUTEX.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Christoph Hellwig <hch@infradead.org>
LKML-Reference: <20100907125054.795929962@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/semaphore.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/semaphore.h b/include/linux/semaphore.h index 7415839ac890..5310d27abd2a 100644 --- a/include/linux/semaphore.h +++ b/include/linux/semaphore.h @@ -26,6 +26,9 @@ struct semaphore { .wait_list = LIST_HEAD_INIT((name).wait_list), \ } +#define DEFINE_SEMAPHORE(name) \ + struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1) + #define DECLARE_MUTEX(name) \ struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1) |