From 5a3c218239516957502c3eae048a2447c9985702 Mon Sep 17 00:00:00 2001 From: Eladash Date: Mon, 29 Mar 2021 23:05:24 +0300 Subject: [PATCH] thread-pool: Fix default rounding mode --- Utilities/Thread.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Utilities/Thread.cpp b/Utilities/Thread.cpp index f566edad1..9de654f7a 100644 --- a/Utilities/Thread.cpp +++ b/Utilities/Thread.cpp @@ -10,6 +10,7 @@ #include "Utilities/JIT.h" #include #include +#include #ifdef _WIN32 #include @@ -2082,6 +2083,8 @@ thread_base::native_entry thread_base::finalize(u64 _self) noexcept thread_ctrl::set_thread_affinity_mask(0); + std::fesetround(FE_TONEAREST); + static constexpr u64 s_stop_bit = 0x8000'0000'0000'0000ull; static atomic_t s_pool_ctr = []