mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-21 19:17:53 -05:00
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>
This commit is contained in:
10
src/common/x64/cpu_wait.h
Normal file
10
src/common/x64/cpu_wait.h
Normal file
@ -0,0 +1,10 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace Common::X64 {
|
||||
|
||||
void MicroSleep();
|
||||
|
||||
} // namespace Common::X64
|
Reference in New Issue
Block a user