fix: HAVE_SCHED_SETAFFINITY is not defined
[userspace-rcu.git] / tests / benchmark / test_rwlock.c
index 38b2a71ed85eb76bee0adc4cfff71a133213b379..f96ca2efc94cac45edf2928dd81ba51dcd7c2b0d 100644 (file)
@@ -90,7 +90,7 @@ pthread_mutex_t affinity_mutex = PTHREAD_MUTEX_INITIALIZER;
 
 static void set_affinity(void)
 {
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
        cpu_set_t mask;
        int cpu, ret;
 #endif /* HAVE_SCHED_SETAFFINITY */
@@ -98,7 +98,7 @@ static void set_affinity(void)
        if (!use_affinity)
                return;
 
-#if HAVE_SCHED_SETAFFINITY
+#ifdef HAVE_SCHED_SETAFFINITY
        ret = pthread_mutex_lock(&affinity_mutex);
        if (ret) {
                perror("Error in pthread mutex lock");
This page took 0.02373 seconds and 4 git commands to generate.