[svn-commits] fjoe: freebsd/trunk r9178 - in /freebsd/trunk: drivers/dahdi/voicebus/ driver...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Aug 23 07:24:18 CDT 2010
Author: fjoe
Date: Mon Aug 23 07:24:13 2010
New Revision: 9178
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9178
Log:
DECLARE_MUTEX can not be properly emulated right now -- drop it.
Modified:
freebsd/trunk/drivers/dahdi/voicebus/voicebus.c
freebsd/trunk/drivers/dahdi/wctdm24xxp/base.c
freebsd/trunk/include/dahdi/compat/bsd.h
Modified: freebsd/trunk/drivers/dahdi/voicebus/voicebus.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/voicebus/voicebus.c?view=diff&rev=9178&r1=9177&r2=9178
==============================================================================
--- freebsd/trunk/drivers/dahdi/voicebus/voicebus.c (original)
+++ freebsd/trunk/drivers/dahdi/voicebus/voicebus.c Mon Aug 23 07:24:13 2010
@@ -1316,12 +1316,12 @@
*/
void voicebus_stop(struct voicebus *vb)
{
- static DECLARE_MUTEX(stop);
-
- down(&stop);
+ static DEFINE_SPINLOCK(stop);
+
+ spin_lock(&stop);
if (test_bit(VOICEBUS_STOP, &vb->flags) || vb_is_stopped(vb)) {
- up(&stop);
+ spin_unlock(&stop);
return;
}
@@ -1335,7 +1335,7 @@
del_timer_sync(&vb->timer);
#endif
vb_disable_interrupts(vb);
- up(&stop);
+ spin_unlock(&stop);
}
EXPORT_SYMBOL(voicebus_stop);
Modified: freebsd/trunk/drivers/dahdi/wctdm24xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=9178&r1=9177&r2=9178
==============================================================================
--- freebsd/trunk/drivers/dahdi/wctdm24xxp/base.c (original)
+++ freebsd/trunk/drivers/dahdi/wctdm24xxp/base.c Mon Aug 23 07:24:13 2010
@@ -217,8 +217,10 @@
return (&wcha80000 == wc->desc) || (&wchb80000 == wc->desc);
}
+#if !defined(__FreeBSD__)
struct wctdm *ifaces[WC_MAX_IFACES];
DECLARE_MUTEX(ifacelock);
+#endif
static void wctdm_release(struct wctdm *wc);
@@ -4916,7 +4918,6 @@
wc = kzalloc(sizeof(*wc), GFP_KERNEL);
if (!wc)
return -ENOMEM;
-#endif
down(&ifacelock);
/* \todo this is a candidate for removal... */
@@ -4927,6 +4928,7 @@
}
}
up(&ifacelock);
+#endif
#ifdef CONFIG_VOICEBUS_ECREFERENCE
for (i = 0; i < ARRAY_SIZE(wc->ec_reference); ++i) {
Modified: freebsd/trunk/include/dahdi/compat/bsd.h
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/include/dahdi/compat/bsd.h?view=diff&rev=9178&r1=9177&r2=9178
==============================================================================
--- freebsd/trunk/include/dahdi/compat/bsd.h (original)
+++ freebsd/trunk/include/dahdi/compat/bsd.h Mon Aug 23 07:24:13 2010
@@ -268,7 +268,6 @@
int down_trylock(struct semaphore *s);
void up(struct semaphore *s);
-#define DECLARE_MUTEX(s) struct semaphore s
#define init_MUTEX(s) _sema_init((s), 1)
#define destroy_MUTEX(s) _sema_destroy(s)
More information about the svn-commits
mailing list