diff options
Diffstat (limited to 'third_party/nix/src/libutil/affinity.cc')
-rw-r--r-- | third_party/nix/src/libutil/affinity.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/third_party/nix/src/libutil/affinity.cc b/third_party/nix/src/libutil/affinity.cc index b6aedc77e54a..7db8906eb0b4 100644 --- a/third_party/nix/src/libutil/affinity.cc +++ b/third_party/nix/src/libutil/affinity.cc @@ -36,7 +36,9 @@ void setAffinityTo(int cpu) { int lockToCurrentCPU() { #if __linux__ int cpu = sched_getcpu(); - if (cpu != -1) setAffinityTo(cpu); + if (cpu != -1) { + setAffinityTo(cpu); + } return cpu; #else return -1; |