aboutsummaryrefslogtreecommitdiff
path: root/src/common/x64/cpu_wait.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [core/core_timing] better MWAITX and WAITPKG delays (#3984)lizzie2026-05-301-75/+0
| | | | | | | | | | | | | This implements MWAITX and WAITPKG extensions (umonitor, mwait) for CPUs that support them. Reduces wait times and bypasses the timing stuff from the OS that is slow (windows notably). generally it should answer within 0.2 to 0.5 microsecs (since most requests wait for that long). Also does a general rework of static ctors and stuff Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3984 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: crueter <crueter@eden-emu.dev>
* [windows] Return x86 microsleep for Windows (#3563)John2026-02-171-0/+75
| | | | | | | | | | Microsleep removal may have regressed AOC in msvc Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3563 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: Lizzie <lizzie@eden-emu.dev> Co-authored-by: John <john@eden-emu.dev> Co-committed-by: John <john@eden-emu.dev>
* [core, windows] remove microSleep() and simply wait on events like on linux ↵lizzie2026-02-091-78/+0
| | | | | | | | | | | | | | | (#3498) we shall see if the original code was put there for a reason or if the microsleeps actually are horrid Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3498 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [meta] fix license headers (#2547)lizzie2025-09-211-0/+3
| | | | | | | Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2547 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [cmake] enable clang-cl and WoA builds (#348)lizzie2025-09-091-1/+1
| | | | | | | | | | | | | | Compilation and CMake fixes for both Windows on ARM and clang-cl, meaning Windows can now be built on both MSVC and clang on both amd64 and aarch64. Compiling on clang is *dramatically* faster so this should be useful for CI. Co-authored-by: crueter <crueter@eden-emu.dev> Co-authored-by: crueter <crueter@crueter.xyz> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/348 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* x64: cpu_wait: Implement MWAITX for non-MSVC compilersMorph2023-06-281-0/+10
|
* x64: cpu_wait: Remove magic valuesMorph2023-06-281-3/+8
|
* x64: cpu_wait: Make use of MWAITX in MicroSleepMorph2023-06-281-12/+21
| | | | | MWAITX is equivalent to UMWAIT on Intel's Alder Lake CPUs. We can emulate TPAUSE by using MONITORX in conjunction with MWAITX to wait for 100K cycles.
* x64: Deduplicate RDTSC usageMorph2023-06-071-19/+1
|
* x64: Simplify RDTSC on non-MSVC compilersMorph2023-03-271-8/+5
| | | | Co-Authored-By: liamwhite <liamwhite@users.noreply.github.com>
* x64: Add MicroSleepMorph2023-03-271-0/+72
MicroSleep allows the processor to pause for a "short" amount of time (in the microsecond range). This is useful for spin-waiting that does not require nanosecond precision. This uses the new TPAUSE instruction introduced on Intel's newest processors as part of the waitpkg instructions. For CPUs that do not support waitpkg instructions, this is equivalent to yield(). Co-Authored-By: liamwhite <liamwhite@users.noreply.github.com>