svn commit: r185145 - user/kmacy/HEAD_fast_multi_xmit/sys/sys
Kip Macy
kmacy at FreeBSD.org
Thu Nov 20 20:45:54 PST 2008
Author: kmacy
Date: Fri Nov 21 04:45:53 2008
New Revision: 185145
URL: http://svn.freebsd.org/changeset/base/185145
Log:
safety check buf_ring_peek - assumes single-consumer
Modified:
user/kmacy/HEAD_fast_multi_xmit/sys/sys/buf_ring.h
Modified: user/kmacy/HEAD_fast_multi_xmit/sys/sys/buf_ring.h
==============================================================================
--- user/kmacy/HEAD_fast_multi_xmit/sys/sys/buf_ring.h Fri Nov 21 04:44:49 2008 (r185144)
+++ user/kmacy/HEAD_fast_multi_xmit/sys/sys/buf_ring.h Fri Nov 21 04:45:53 2008 (r185145)
@@ -233,6 +233,11 @@ static __inline void *
buf_ring_peek(struct buf_ring *br)
{
+#ifdef DEBUG_BUFRING
+ if (!mtx_owned(br->br_lock))
+ panic("lock not held on single consumer dequeue");
+#endif
+ mb();
return (br->br_ring[br->br_cons_tail]);
}
More information about the svn-src-user
mailing list