[svn-commits] sruffell: branch linux/2.4 r9690 - /linux/branches/2.4/include/dahdi/kernel.h

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jan 20 23:32:35 CST 2011


Author: sruffell
Date: Thu Jan 20 23:32:31 2011
New Revision: 9690

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9690
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>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=9579

Modified:
    linux/branches/2.4/include/dahdi/kernel.h

Modified: linux/branches/2.4/include/dahdi/kernel.h
URL: http://svnview.digium.com/svn/dahdi/linux/branches/2.4/include/dahdi/kernel.h?view=diff&rev=9690&r1=9689&r2=9690
==============================================================================
--- linux/branches/2.4/include/dahdi/kernel.h (original)
+++ linux/branches/2.4/include/dahdi/kernel.h Thu Jan 20 23:32:31 2011
@@ -1267,6 +1267,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