[svn-commits] fjoe: freebsd/trunk r8795 - /freebsd/trunk/include/dahdi/compat/bsd.h
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Sun Jun 20 13:23:23 CDT 2010
Author: fjoe
Date: Sun Jun 20 13:23:20 2010
New Revision: 8795
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=8795
Log:
Initialize rwlocks (that are actually sx locks) with SX_NOADAPTIVE, so they spin
instead of sleeping: dahdi_receive() calls process_masterspan() that uses
rwlocks and dahdi_receive() can be called from interrupt filter.
Modified:
freebsd/trunk/include/dahdi/compat/bsd.h
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=8795&r1=8794&r2=8795
==============================================================================
--- freebsd/trunk/include/dahdi/compat/bsd.h (original)
+++ freebsd/trunk/include/dahdi/compat/bsd.h Sun Jun 20 13:23:20 2010
@@ -144,7 +144,7 @@
#define DEFINE_RWLOCK(name) \
struct sx name; \
SX_SYSINIT(name, &name, #name)
-#define rwlock_init(rwlock) sx_init(rwlock, "DAHDI rwlock")
+#define rwlock_init(rwlock) sx_init_flags(rwlock, "DAHDI rwlock", SX_NOADAPTIVE)
#define read_lock(rwlock) sx_slock(rwlock)
#define read_unlock(rwlock) sx_sunlock(rwlock)
@@ -438,8 +438,6 @@
char *
strncat(char * __restrict dst, const char * __restrict src, size_t n);
-#define memmove(dst, src, size) bcopy((src), (dst), (size))
-
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#define ENODATA EINVAL
More information about the svn-commits
mailing list