Merge pull request #154 from rsanheim/dev-mac

Dev branch with mac fix
This commit is contained in:
fireice-uk
2017-06-20 12:50:51 +01:00
committed by GitHub
+1 -1
View File
@@ -51,7 +51,7 @@ void thd_setaffinity(std::thread::native_handle_type h, uint64_t cpu_id)
{
#if defined(__APPLE__)
thread_port_t mach_thread;
thread_affinity_policy_data_t policy = { cpu_id };
thread_affinity_policy_data_t policy = { static_cast<integer_t>(cpu_id) };
mach_thread = pthread_mach_thread_np(h);
thread_policy_set(mach_thread, THREAD_AFFINITY_POLICY, (thread_policy_t)&policy, 1);
#elif defined(__FreeBSD__)