mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-29 22:54:18 +00:00
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:
1 parent
0d2739bfd2
commit
5c75d4cf5b
5 files changed
+35
-27
No files matched your search
+2
-10
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user