FS-4220 --resolve i refactored this into a general cross platform function and use it everywhere else we try to set affinity

This commit is contained in:
Anthony Minessale committed 2012-05-15 08:31:42 -05:00
1 parent 0d2739bfd2
commit 5c75d4cf5b
5 files changed
+35 -27

No files matched your search

+2 -10
View File
@@ -253,16 +253,8 @@ static void *SWITCH_THREAD_FUNC switch_event_dispatch_thread(switch_thread_t *th
EVENT_DISPATCH_QUEUE_RUNNING[my_id] = 1;
switch_mutex_unlock(EVENT_QUEUE_MUTEX);
#ifdef HAVE_CPU_SET_MACROS
{
cpu_set_t set;
CPU_ZERO(&set);
CPU_SET(my_id, &set);
sched_setaffinity(0, sizeof(set), &set);
}
#endif
switch_core_thread_set_cpu_affinity(my_id);
for (;;) {
void *pop = NULL;