mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 13:31:27 +12:00
Replace utils::cnttz{32,64} with std::countr_{zero,one}
Make #include <bit> mandatory.
This commit is contained in:
parent
adfc9d93c3
commit
d0c199d455
10 changed files with 15 additions and 37 deletions
|
@ -2406,7 +2406,7 @@ void thread_ctrl::set_thread_affinity_mask(u64 mask)
|
|||
SetThreadAffinityMask(_this_thread, mask);
|
||||
#elif __APPLE__
|
||||
// Supports only one core
|
||||
thread_affinity_policy_data_t policy = { static_cast<integer_t>(utils::cnttz64(mask)) };
|
||||
thread_affinity_policy_data_t policy = { static_cast<integer_t>(std::countr_zero(mask)) };
|
||||
thread_port_t mach_thread = pthread_mach_thread_np(pthread_self());
|
||||
thread_policy_set(mach_thread, THREAD_AFFINITY_POLICY, reinterpret_cast<thread_policy_t>(&policy), 1);
|
||||
#elif defined(__linux__) || defined(__DragonFly__) || defined(__FreeBSD__)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue