diff options
Diffstat (limited to 'nix/libutil/affinity.cc')
-rw-r--r-- | nix/libutil/affinity.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nix/libutil/affinity.cc b/nix/libutil/affinity.cc index 3e21f43a2e..d50e9f3e9c 100644 --- a/nix/libutil/affinity.cc +++ b/nix/libutil/affinity.cc @@ -2,6 +2,8 @@ #include "util.hh" #include "affinity.hh" +#include <format> + #if HAVE_SCHED_H #include <sched.h> #endif @@ -20,12 +22,12 @@ void setAffinityTo(int cpu) #if HAVE_SCHED_SETAFFINITY if (sched_getaffinity(0, sizeof(cpu_set_t), &savedAffinity) == -1) return; didSaveAffinity = true; - printMsg(lvlDebug, format("locking this thread to CPU %1%") % cpu); + printMsg(lvlDebug, std::format("locking this thread to CPU {}", cpu)); cpu_set_t newAffinity; CPU_ZERO(&newAffinity); CPU_SET(cpu, &newAffinity); if (sched_setaffinity(0, sizeof(cpu_set_t), &newAffinity) == -1) - printMsg(lvlError, format("failed to lock thread to CPU %1%") % cpu); + printMsg(lvlError, std::format("failed to lock thread to CPU {}", cpu)); #endif } |