dahdi: If mutexes are not available use semaphores instead.
Mutexes were added in 2.6.16. This will allow future changes to use the mutex API without breaking on pre 2.6.16 kernels. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9579 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
parent
e0d94d5ca4
commit
593787e3b3
@ -1317,6 +1317,12 @@ wait_for_completion_interruptible_timeout(struct completion *x,
|
||||
struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1)
|
||||
#endif
|
||||
|
||||
#ifndef DEFINE_MUTEX
|
||||
#define DEFINE_MUTEX DEFINE_SEMAPHORE
|
||||
#define mutex_lock(_x) down(_x)
|
||||
#define mutex_unlock(_x) up(_x)
|
||||
#endif
|
||||
|
||||
#ifndef DMA_BIT_MASK
|
||||
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user