diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-08 14:15:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-08 14:15:51 -0400 |
commit | 2c20130f200b8f9aa746b7c7bc265ab129c29ead (patch) | |
tree | 3963fb471dd62396f708912b996ff14d63565f9a | |
parent | 1faa6ec8ccbde8c4f0237be80473a4294ebf8289 (diff) | |
parent | febc88c5948f81114f64c3412011d695aecae233 (diff) |
Merge branch 'semaphore-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'semaphore-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
semaphore: Add DEFINE_SEMAPHORE
-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 { | |||
26 | .wait_list = LIST_HEAD_INIT((name).wait_list), \ | 26 | .wait_list = LIST_HEAD_INIT((name).wait_list), \ |
27 | } | 27 | } |
28 | 28 | ||
29 | #define DEFINE_SEMAPHORE(name) \ | ||
30 | struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1) | ||
31 | |||
29 | #define DECLARE_MUTEX(name) \ | 32 | #define DECLARE_MUTEX(name) \ |
30 | struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1) | 33 | struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1) |
31 | 34 | ||