svn commit: r185195 - user/kmacy/HEAD_fast_multi_xmit/sys/sys
Kip Macy
kmacy at FreeBSD.org
Sat Nov 22 16:23:58 PST 2008
Author: kmacy
Date: Sun Nov 23 00:23:58 2008
New Revision: 185195
URL: http://svn.freebsd.org/changeset/base/185195
Log:
- fix buf_ring_peek
- don't enable debugging
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 Sun Nov 23 00:22:52 2008 (r185194)
+++ user/kmacy/HEAD_fast_multi_xmit/sys/sys/buf_ring.h Sun Nov 23 00:23:58 2008 (r185195)
@@ -56,8 +56,6 @@
#error "unknown compiler"
#endif
-#define DEBUG_BUFRING 1
-
#if defined(INVARIANTS) && !defined(DEBUG_BUFRING)
#define DEBUG_BUFRING 1
#endif
@@ -245,7 +243,10 @@ buf_ring_peek(struct buf_ring *br)
panic("lock not held on single consumer dequeue");
#endif
mb();
- return (br->br_ring[br->br_cons_tail]);
+ if (br->br_cons_head == br->br_prod_tail)
+ return (NULL);
+
+ return (br->br_ring[br->br_cons_head]);
}
static __inline int
More information about the svn-src-user
mailing list