diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2010-09-07 10:34:01 -0400 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2010-10-30 06:12:50 -0400 |
| commit | 4882720b267b7b1d1b0ce08334b205f0329d4615 (patch) | |
| tree | dd54880f84b7b7fb2bbdb529ffada434aca1e4d9 /include | |
| parent | 45f4d0243525b6bc747c946937ced437b135a84d (diff) | |
semaphore: Remove mutex emulation
Semaphores used as mutexes have been deprecated for years. Now that
all users are either converted to real semaphores or to mutexes remove
the cruft.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Christoph Hellwig <hch@infradead.org>
LKML-Reference: <20100907125057.562399240@linutronix.de>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/semaphore.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/include/linux/semaphore.h b/include/linux/semaphore.h index 5310d27abd2a..39fa04966aa8 100644 --- a/include/linux/semaphore.h +++ b/include/linux/semaphore.h | |||
| @@ -29,9 +29,6 @@ struct semaphore { | |||
| 29 | #define DEFINE_SEMAPHORE(name) \ | 29 | #define DEFINE_SEMAPHORE(name) \ |
| 30 | struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1) | 30 | struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1) |
| 31 | 31 | ||
| 32 | #define DECLARE_MUTEX(name) \ | ||
| 33 | struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1) | ||
| 34 | |||
| 35 | static inline void sema_init(struct semaphore *sem, int val) | 32 | static inline void sema_init(struct semaphore *sem, int val) |
| 36 | { | 33 | { |
| 37 | static struct lock_class_key __key; | 34 | static struct lock_class_key __key; |
| @@ -39,9 +36,6 @@ static inline void sema_init(struct semaphore *sem, int val) | |||
| 39 | lockdep_init_map(&sem->lock.dep_map, "semaphore->lock", &__key, 0); | 36 | lockdep_init_map(&sem->lock.dep_map, "semaphore->lock", &__key, 0); |
| 40 | } | 37 | } |
| 41 | 38 | ||
| 42 | #define init_MUTEX(sem) sema_init(sem, 1) | ||
| 43 | #define init_MUTEX_LOCKED(sem) sema_init(sem, 0) | ||
| 44 | |||
| 45 | extern void down(struct semaphore *sem); | 39 | extern void down(struct semaphore *sem); |
| 46 | extern int __must_check down_interruptible(struct semaphore *sem); | 40 | extern int __must_check down_interruptible(struct semaphore *sem); |
| 47 | extern int __must_check down_killable(struct semaphore *sem); | 41 | extern int __must_check down_killable(struct semaphore *sem); |
