mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-11-13 17:49:41 +01:00
Implement set_ideal_processor_core (linux)
This commit is contained in:
1 parent
9e0b881b2b
commit
dbc9bdfe02
2 files changed
+6
No files matched your search
@@ -1916,6 +1916,11 @@ void thread_ctrl::set_ideal_processor_core(int core)
|
||||
#ifdef _WIN32
|
||||
HANDLE _this_thread = GetCurrentThread();
|
||||
SetThreadIdealProcessor(_this_thread, core);
|
||||
#else
|
||||
cpu_set_t cs;
|
||||
CPU_ZERO(&cs);
|
||||
CPU_SET(core, &cs);
|
||||
pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cs);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user