2
0
mirror of https://github.com/boostorg/atomic.git synced 2026-02-02 08:22:08 +00:00
Files
atomic/include
Andrey Semashev 69c150e178 Added a workaround for broken codegen in MSVC-8 affecting emulated wait.
When the emulated wait function is inlined, the compiler sometimes generates
code that acts as if a wrong value is returned from the wait function. The
compiler simply "forgets" to save the atomic value into an object on the
stack, which makes it later use a bogus value as the "returned" value.

Preventing inlining seems to work around the problem.

Discovered by wait_api notify_one/notify_all test failures for struct_3_bytes.
Oddly enough, the same test for uint32_t did not fail.
2020-06-12 02:51:37 +03:00
..