Page MenuHomeFreeBSD

D46152.id141421.diff
No OneTemporary

D46152.id141421.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
@@ -85,7 +85,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();
@@ -223,7 +223,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);
}
@@ -251,7 +251,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
Fri, Jan 17, 4:23 AM (21 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15833336
Default Alt Text
D46152.id141421.diff (769 B)

Event Timeline