Example #1
0
int proc_unbind_thread ()
{
#ifdef _LINUX_
    return sched_setaffinity (0, sizeof (cpu_set_t), proc_get_full_set());
#elif defined (_SOLARIS_)
    return processor_bind (P_LWPID, P_MYID, PBIND_NONE, NULL);
#endif
}
Example #2
0
int proc_unbind_thread ()
{
    // Forbid thread binding
    if (getenv("MAPRED_NO_BINDING") != NULL) {
	return 0;
    }

#ifdef _LINUX_
    return sched_setaffinity (0, sizeof (cpu_set_t), proc_get_full_set());
#elif defined (_SOLARIS_)
    return processor_bind (P_LWPID, P_MYID, PBIND_NONE, NULL);
#endif
}