mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-08 07:51:28 +12:00
LV2: Improve sys_timer_usleep by using CPU usermode waiting
* Linux: set timerslack to minimum value - Linux delays the wakeup of threads to save power, this feature isn't needed for this application * Utils: Add detection for waitpkg and monitorx extensions - These instructions are used for user mode wait instructions * lv2: Use user mode wait instructions instead of yielding when appropriate
This commit is contained in:
parent
aee97e414f
commit
d4cf12bc17
4 changed files with 101 additions and 1 deletions
|
@ -1049,6 +1049,11 @@ int main(int argc, char** argv)
|
|||
}
|
||||
}
|
||||
|
||||
// Set timerslack value for Linux. The default value is 50,000ns. Change this to just 1 since we value precise timers.
|
||||
#ifdef __linux__
|
||||
prctl(PR_SET_TIMERSLACK, 1, 0, 0, 0);
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
// Create dummy permanent low resolution timer to workaround messing with system timer resolution
|
||||
QTimer* dummy_timer = new QTimer(app.data());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue