forgot 1 for umwait

This commit is contained in:
lizzie 2026-05-23 10:45:31 +00:00
parent f84585d4fb
commit f002f1e7b6

View file

@ -190,7 +190,7 @@ bool Event::WaitFor(const std::chrono::nanoseconds& time) {
// #UD If CPUID.7.0:ECX.WAITPKG[bit 5]=0. // #UD If CPUID.7.0:ECX.WAITPKG[bit 5]=0.
while (true) { while (true) {
_umonitor(std::addressof(is_set)); _umonitor(std::addressof(is_set));
if (!IsSet() && !_umwait(0, target_tsc)) if (!IsSet() && !_umwait(1, target_tsc))
return false; return false;
bool expected = true; bool expected = true;
if (is_set.compare_exchange_weak(expected, false, std::memory_order_release)) if (is_set.compare_exchange_weak(expected, false, std::memory_order_release))