Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107515881
D46152.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
769 B
Referenced Files
None
Subscribers
None
D46152.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
@@ -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
Details
Attached
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)
Attached To
Mode
D46152: buf_ring: Use atomic operations with br_cons_tail
Attached
Detach File
Event Timeline
Log In to Comment