diff --git a/stl/src/xnotify.cpp b/stl/src/xnotify.cpp index 96aebb485b2..a49c88917b8 100644 --- a/stl/src/xnotify.cpp +++ b/stl/src/xnotify.cpp @@ -93,8 +93,8 @@ _CRTIMP2_PURE void __cdecl _Cnd_do_broadcast_at_thread_exit() noexcept { if (block->data[i].res) { *block->data[i].res = 1; } - _Mtx_unlock(block->data[i].mtx); _Cnd_broadcast(block->data[i].cnd); + _Mtx_unlock(block->data[i].mtx); block->data[i].mtx = nullptr; --block->num_used; } diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/expected_results.txt index 09e58f0140b..08edafbe22b 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/expected_results.txt @@ -626,11 +626,6 @@ std/thread/futures/futures.task/futures.task.members/make_ready_at_thread_exit.p # LWG-3120 Unclear behavior of monotonic_buffer_resource::release() std/utilities/utility/mem.res/mem.res.monotonic.buffer/mem.res.monotonic.buffer.mem/release_reset_initial_status.pass.cpp FAIL -# LWG-3343 "Ordering of calls to unlock() and notify_all() in Effects element of notify_all_at_thread_exit() should be reversed" (Open) -# libc++ speculatively implements LWG-3343. If we wanted to do the same thing, -# we'd need to reverse the order of the _Mtx_unlock() and _Cnd_broadcast() calls in xnotify.cpp. -std/thread/thread.condition/notify_all_at_thread_exit_lwg3343.pass.cpp SKIPPED - # *** C1XX COMPILER BUGS *** # DevCom-1436243 VSO-1335743 constexpr new initialized array