Replace utils::cnttz{32,64} with std::countr_{zero,one}
Make #include <bit> mandatory.
This commit is contained in:
@@ -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__)
|
||||
|
||||
Reference in New Issue
Block a user