[svn-commits] sruffell: linux/trunk r9579 - /linux/trunk/include/dahdi/kernel.h
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Jan 3 18:26:04 UTC 2011
Author: sruffell
Date: Mon Jan 3 12:26:00 2011
New Revision: 9579
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9579
Log:
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 at digium.com>
Acked-by: Kinsey Moore <kmoore at digium.com>
Modified:
linux/trunk/include/dahdi/kernel.h
Modified: linux/trunk/include/dahdi/kernel.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/include/dahdi/kernel.h?view=diff&rev=9579&r1=9578&r2=9579
==============================================================================
--- linux/trunk/include/dahdi/kernel.h (original)
+++ linux/trunk/include/dahdi/kernel.h Mon Jan 3 12:26:00 2011
@@ -1317,6 +1317,12 @@
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
More information about the svn-commits
mailing list