diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2023-03-21 21:28:38 -0400 |
---|---|---|
committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2023-03-27 17:45:22 -0400 |
commit | 27c33ab73fd03d659654c49967a081214daf6ac2 (patch) | |
tree | ce139e675dce91045a05fb3d5e44803af9931d0e /src/common/CMakeLists.txt | |
parent | d2cfe25b07906f36c688ccacde30e3dc50123e8f (diff) |
x64: Add MicroSleep
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>
Diffstat (limited to 'src/common/CMakeLists.txt')
-rw-r--r-- | src/common/CMakeLists.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index c1d2b24a1..13ed68b3f 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -160,6 +160,8 @@ if(ARCHITECTURE_x86_64) PRIVATE x64/cpu_detect.cpp x64/cpu_detect.h + x64/cpu_wait.cpp + x64/cpu_wait.h x64/native_clock.cpp x64/native_clock.h x64/xbyak_abi.h |