Rewrite condition variables

Implement helper functions balanced_wait_until and balanced_awaken
They include new path for Windows 8.1+ (WaitOnAddress)

shared_mutex, cond_variable, cond_one, cond_x16 modified to use it
Added helper function utils::popcnt16
Replace most semaphore<> with shared_mutex
This commit is contained in:
Nekotekina 2018-11-26 18:55:22 +03:00
parent f442a8a84c
commit 96cabeadff
23 changed files with 269 additions and 338 deletions

View file

@ -1383,7 +1383,7 @@ extern void ppu_initialize(const ppu_module& info)
std::shared_ptr<jit_compiler> jit;
// Compiler mutex (global)
static semaphore<> jmutex;
static shared_mutex jmutex;
// Initialize global semaphore with the max number of threads
u32 max_threads = static_cast<u32>(g_cfg.core.llvm_threads);