about summary refs log tree commit diff
path: root/src/libutil
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/affinity.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/libutil/affinity.cc b/src/libutil/affinity.cc
index 7a6310cadb00..3e21f43a2e9d 100644
--- a/src/libutil/affinity.cc
+++ b/src/libutil/affinity.cc
@@ -33,13 +33,12 @@ void setAffinityTo(int cpu)
 int lockToCurrentCPU()
 {
 #if HAVE_SCHED_SETAFFINITY
-    if (getEnv("NIX_AFFINITY_HACK", "1") == "1") {
-        int cpu = sched_getcpu();
-        if (cpu != -1) setAffinityTo(cpu);
-        return cpu;
-    }
-#endif
+    int cpu = sched_getcpu();
+    if (cpu != -1) setAffinityTo(cpu);
+    return cpu;
+#else
     return -1;
+#endif
 }