Commit e5d88948 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook GitHub Bot

when Baton::wait marks timeout, just use relaxed

Summary: While the baton is used to guard associated memory, if the wait times out, the associated memory is not available. There is no corresponding load-acquire, so marking the timeout may use a store-relaxed rather than a store-release.

Reviewed By: luciang

Differential Revision: D31676286

fbshipit-source-id: dd2474db1ba053337de7e84aa88e7556e630b1ce
parent 6eb46044
......@@ -307,7 +307,7 @@ class Baton {
// Awoken by the deadline passing.
if (rv == detail::FutexResult::TIMEDOUT) {
assert(deadline != (std::chrono::time_point<Clock, Duration>::max()));
state_.store(TIMED_OUT, std::memory_order_release);
state_.store(TIMED_OUT, std::memory_order_relaxed);
return false;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment