Add check for pthread_setaffinity_np

This commit is contained in:
Francesco Del Degan
2015-05-25 09:37:14 +02:00
parent 4cded5dc98
commit e7c0d41dd2
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -1662,7 +1662,7 @@ static void runPcapLoop(u_int16_t thread_id) {
void *processing_thread(void *_thread_id) {
long thread_id = (long) _thread_id;
#ifdef linux
#if defined(linux) && defined(HAVE_PTHREAD_SETAFFINITY_NP)
if(core_affinity[thread_id] >= 0) {
cpu_set_t cpuset;
CPU_ZERO(&cpuset);