Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F161607218
D54827.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D54827.diff
View Options
diff --git a/sys/sys/buf_ring.h b/sys/sys/buf_ring.h
--- a/sys/sys/buf_ring.h
+++ b/sys/sys/buf_ring.h
@@ -266,7 +266,7 @@
* the compare and an atomic.
*/
static __inline void
-buf_ring_putback_sc(struct buf_ring *br, void *new)
+buf_ring_putback_sc(struct buf_ring *br, void *buf)
{
uint32_t cons_idx, mask;
@@ -274,7 +274,7 @@
cons_idx = atomic_load_32(&br->br_cons_head) & mask;
KASSERT(cons_idx != (atomic_load_32(&br->br_prod_tail) & mask),
("Buf-Ring has none in putback")) ;
- br->br_ring[cons_idx] = new;
+ br->br_ring[cons_idx] = buf;
}
/*
@@ -305,7 +305,7 @@
buf_ring_peek_clear_sc(struct buf_ring *br)
{
uint32_t cons_head, prod_tail, mask;
- void *ret;
+ void *buf;
#if defined(DEBUG_BUFRING) && defined(_KERNEL)
if (!mtx_owned(br->br_lock))
@@ -319,7 +319,7 @@
if (cons_head == prod_tail)
return (NULL);
- ret = br->br_ring[cons_head & mask];
+ buf = br->br_ring[cons_head & mask];
#ifdef DEBUG_BUFRING
/*
* Single consumer, i.e. cons_head will not move while we are
@@ -327,13 +327,12 @@
*/
br->br_ring[cons_head & mask] = NULL;
#endif
- return (ret);
+ return (buf);
}
static __inline int
buf_ring_full(struct buf_ring *br)
{
-
return (atomic_load_32(&br->br_prod_head) ==
atomic_load_32(&br->br_cons_tail) + br->br_cons_size - 1);
}
@@ -341,7 +340,6 @@
static __inline int
buf_ring_empty(struct buf_ring *br)
{
-
return (atomic_load_32(&br->br_cons_head) ==
atomic_load_32(&br->br_prod_tail));
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jul 6, 7:07 AM (16 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34742388
Default Alt Text
D54827.diff (1 KB)
Attached To
Mode
D54827: buf_ring: Rename some variables
Attached
Detach File
Event Timeline
Log In to Comment