Closed
Description
fn try_recv_<T:Owned>(p: &mut Packet<T>) -> Option<T> {
// optimistic path
match p.header.state {
Full => {
let payload = replace(&mut p.payload, None);
The read of p.header.state
needs to be an acquire barrier probably via atomic_load_acq
to ensure it comes before the read of p.payload
, matching with the release by swap_state_rel
in send
.