DescriptionEnsure that |Thread::id_| is only accessed when an happens-after relationship has been established with its write.
In practice this mostly means only reading it while |id_event_| is signaled.
Also don't AssertWaitAllowed() in WaitableEvent::TimedWait(0) on Windows to allow
WaitableEvent::IsSignaled() to be called on threads which aren't allowed to wait.
From MSDN:
The time-out interval, in milliseconds. If a nonzero value is specified, the function
waits until the object is signaled or the interval elapses. If dwMilliseconds is zero,
the function does not enter a wait state if the object is not signaled; it always returns
immediately. If dwMilliseconds is INFINITE, the function will return only when the object
is signaled.
BUG=638578
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_tsan_rel_ng
Committed: https://crrev.com/3e09ce122b81dadacd6ffde73bee126952ff0d1f
Cr-Commit-Position: refs/heads/master@{#417117}
Patch Set 1 #Patch Set 2 : Only AssertWaitAllowed() in WaitableEvent::TimedWait if time is non-zero #
Messages
Total messages: 19 (10 generated)
|