summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/dahdi/kernel.h5
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