diff options
author | wkoszek <wkoszek@FreeBSD.org> | 2007-03-31 15:43:06 +0000 |
---|---|---|
committer | wkoszek <wkoszek@FreeBSD.org> | 2007-03-31 15:43:06 +0000 |
commit | 1463edcf111b4a3845f2b61e56ec3fe8f4d0b6b9 (patch) | |
tree | 779bfb61b6eaa116721dba7649ddd0a23adbf475 /sys/netgraph/ng_base.c | |
parent | bc12d14a681ae18af834234a51458462f38bc17b (diff) | |
download | FreeBSD-src-1463edcf111b4a3845f2b61e56ec3fe8f4d0b6b9.zip FreeBSD-src-1463edcf111b4a3845f2b61e56ec3fe8f4d0b6b9.tar.gz |
We don't need spinning locks here. Change them to the adaptive mutexes. This
change should bring no performance decrease, as it did not in my tests.
Reviewed by: julian, glebius
Approved by: cognet (mentor)
Diffstat (limited to 'sys/netgraph/ng_base.c')
-rw-r--r-- | sys/netgraph/ng_base.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c index df0e86f..cf774ac 100644 --- a/sys/netgraph/ng_base.c +++ b/sys/netgraph/ng_base.c @@ -229,17 +229,17 @@ MALLOC_DEFINE(M_NETGRAPH_MSG, "netgraph_msg", "netgraph name storage"); MALLOC(node, node_p, sizeof(*node), M_NETGRAPH_NODE, M_NOWAIT | M_ZERO) #define NG_QUEUE_LOCK_INIT(n) \ - mtx_init(&(n)->q_mtx, "ng_node", NULL, MTX_SPIN) + mtx_init(&(n)->q_mtx, "ng_node", NULL, MTX_DEF) #define NG_QUEUE_LOCK(n) \ - mtx_lock_spin(&(n)->q_mtx) + mtx_lock(&(n)->q_mtx) #define NG_QUEUE_UNLOCK(n) \ - mtx_unlock_spin(&(n)->q_mtx) + mtx_unlock(&(n)->q_mtx) #define NG_WORKLIST_LOCK_INIT() \ - mtx_init(&ng_worklist_mtx, "ng_worklist", NULL, MTX_SPIN) + mtx_init(&ng_worklist_mtx, "ng_worklist", NULL, MTX_DEF) #define NG_WORKLIST_LOCK() \ - mtx_lock_spin(&ng_worklist_mtx) + mtx_lock(&ng_worklist_mtx) #define NG_WORKLIST_UNLOCK() \ - mtx_unlock_spin(&ng_worklist_mtx) + mtx_unlock(&ng_worklist_mtx) #ifdef NETGRAPH_DEBUG /*----------------------------------------------*/ /* |