Page MenuHomeFreeBSD

D46152.diff
No OneTemporary

D46152.diff

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
@@ -91,7 +91,7 @@
do {
prod_head = br->br_prod_head;
prod_next = prod_head + 1;
- cons_tail = br->br_cons_tail;
+ cons_tail = atomic_load_acq_32(&br->br_cons_tail);
if ((int32_t)(cons_tail + br->br_prod_size - prod_next) < 1) {
rmb();
@@ -229,7 +229,7 @@
panic("inconsistent list cons_tail=%d cons_head=%d",
br->br_cons_tail, cons_head);
#endif
- br->br_cons_tail = cons_next;
+ atomic_store_rel_32(&br->br_cons_tail, cons_next);
return (buf);
}
@@ -257,7 +257,7 @@
#ifdef DEBUG_BUFRING
br->br_ring[cons_head & mask] = NULL;
#endif
- br->br_cons_tail = cons_next;
+ atomic_store_rel_32(&br->br_cons_tail, cons_next);
}
/*

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 16, 7:42 AM (2 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15822377
Default Alt Text
D46152.diff (769 B)

Event Timeline