mirror of
https://github.com/boostorg/atomic.git
synced 2026-02-02 08:22:08 +00:00
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.