aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-09-08 11:15:51 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-09-08 11:15:51 -0700
commit2c20130f200b8f9aa746b7c7bc265ab129c29ead (patch)
tree3963fb471dd62396f708912b996ff14d63565f9a
parent1faa6ec8ccbde8c4f0237be80473a4294ebf8289 (diff)
parentfebc88c5948f81114f64c3412011d695aecae233 (diff)
downloadmrst-s0i3-test-2c20130f200b8f9aa746b7c7bc265ab129c29ead.tar.gz
mrst-s0i3-test-2c20130f200b8f9aa746b7c7bc265ab129c29ead.tar.xz
mrst-s0i3-test-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
-rw-r--r--include/linux/semaphore.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/semaphore.h b/include/linux/semaphore.h
index 7415839ac89..5310d27abd2 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)