diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-08 20:15:51 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-08 20:15:51 +0200 |
commit | 2c20130f200b8f9aa746b7c7bc265ab129c29ead (patch) | |
tree | 3963fb471dd62396f708912b996ff14d63565f9a /include | |
parent | Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kern... (diff) | |
parent | semaphore: Add DEFINE_SEMAPHORE (diff) | |
download | linux-2c20130f200b8f9aa746b7c7bc265ab129c29ead.tar.xz linux-2c20130f200b8f9aa746b7c7bc265ab129c29ead.zip |
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
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) |