diff options
author | Shaun Ruffell <sruffell@digium.com> | 2010-11-04 16:40:29 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2010-11-04 16:40:29 +0000 |
commit | 1f059fb35ea0e894b7d456136c1b8d1b4d117dca (patch) | |
tree | 3392234b7d277ffb8487b75b569d5772efe690b2 /include | |
parent | 9c3d9499f183c61f0ca3cc06266ce8b9c028203a (diff) |
Remove mutex emulation
Using semaphores as mutexes was removed from the kernel in 4882720b267b.
Just use straight semaphores now. 'DECLARE_MUTEX()' -> 'DEFINE_SEMAPHORE()'
and 'init_MUTEX()' -> 'sema_init()'.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
LKML-Reference: <20100907125057.562399240@linutronix.de>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9464 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'include')
-rw-r--r-- | include/dahdi/kernel.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h index cf9ee3c..e784b34 100644 --- a/include/dahdi/kernel.h +++ b/include/dahdi/kernel.h @@ -1291,6 +1291,11 @@ wait_for_completion_timeout(struct completion *x, unsigned long timeout) #define DEFINE_SPINLOCK(x) spinlock_t x = SPIN_LOCK_UNLOCKED #endif +#ifndef DEFINE_SEMAPHORE +#define DEFINE_SEMAPHORE(name) \ + struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1) +#endif + #ifndef DMA_BIT_MASK #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) #endif |