From 1f059fb35ea0e894b7d456136c1b8d1b4d117dca Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Thu, 4 Nov 2010 16:40:29 +0000 Subject: 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 LKML-Reference: <20100907125057.562399240@linutronix.de> Acked-by: Tzafrir Cohen git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9464 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- include/dahdi/kernel.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') 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 -- cgit v1.2.3