aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/semaphore.h
diff options
context:
space:
mode:
authorLiam Girdwood <lrg@slimlogic.co.uk>2010-11-03 10:11:27 -0400
committerLiam Girdwood <lrg@slimlogic.co.uk>2010-11-03 10:11:27 -0400
commit8f987768eb99631374f4ab0bb19cd062baf1397d (patch)
treeb89aa5c207f7ba6a688f45657424b937f17ceb8a /include/linux/semaphore.h
parent63f7526f26f0a9291ac3f7a986aa18ebfb61ec19 (diff)
parentc8ddb2713c624f432fa5fe3c7ecffcdda46ea0d4 (diff)
Merge commit 'v2.6.37-rc1' into for-2.6.37
Diffstat (limited to 'include/linux/semaphore.h')
-rw-r--r--include/linux/semaphore.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/include/linux/semaphore.h b/include/linux/semaphore.h
index 7415839ac890..39fa04966aa8 100644
--- a/include/linux/semaphore.h
+++ b/include/linux/semaphore.h
@@ -26,7 +26,7 @@ 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 DECLARE_MUTEX(name) \ 29#define DEFINE_SEMAPHORE(name) \
30 struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1) 30 struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1)
31 31
32static inline void sema_init(struct semaphore *sem, int val) 32static inline void sema_init(struct semaphore *sem, int val)
@@ -36,9 +36,6 @@ static inline void sema_init(struct semaphore *sem, int val)
36 lockdep_init_map(&sem->lock.dep_map, "semaphore->lock", &__key, 0); 36 lockdep_init_map(&sem->lock.dep_map, "semaphore->lock", &__key, 0);
37} 37}
38 38
39#define init_MUTEX(sem) sema_init(sem, 1)
40#define init_MUTEX_LOCKED(sem) sema_init(sem, 0)
41
42extern void down(struct semaphore *sem); 39extern void down(struct semaphore *sem);
43extern int __must_check down_interruptible(struct semaphore *sem); 40extern int __must_check down_interruptible(struct semaphore *sem);
44extern int __must_check down_killable(struct semaphore *sem); 41extern int __must_check down_killable(struct semaphore *sem);