From dd97ebcd1d733f221a644542cde1116f5760a1c1 Mon Sep 17 00:00:00 2001 From: lizzie Date: Sun, 24 May 2026 07:09:30 +0000 Subject: [PATCH] MSVC I LOVE YOU THANS --- src/common/thread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/thread.cpp b/src/common/thread.cpp index fb06487f0c..61eaa43998 100644 --- a/src/common/thread.cpp +++ b/src/common/thread.cpp @@ -185,7 +185,7 @@ bool Event::WaitFor(const std::chrono::nanoseconds time) { // RDTSC may be fenced here due to atomic load auto const now = _rdtsc(); if (end > now) { - u32 const cycles = std::min(std::numeric_limits::max(), s64(end) - s64(now)); + u32 const cycles = std::min((std::numeric_limits::max)(), s64(end) - s64(now)); // See here: https://github.com/torvalds/linux/blob/948a64995aca6820abefd17f1a4258f5835c5ad9/arch/x86/lib/delay.c#L93 // MWAITX accepts a 32-bit input timer which determines the total number of cycles to wait for // NOT THE TOTAL ABSOLUTE TSC VALUE, it's just a delta