mirror of
https://github.com/NixOS/nix
synced 2025-06-29 06:21:14 +02:00
printMsg(lvlError, ...) -> printError(...) etc.
This commit is contained in:
parent
4036185cb4
commit
c55bf085eb
30 changed files with 140 additions and 140 deletions
|
@ -20,12 +20,12 @@ void setAffinityTo(int cpu)
|
|||
#if __linux__
|
||||
if (sched_getaffinity(0, sizeof(cpu_set_t), &savedAffinity) == -1) return;
|
||||
didSaveAffinity = true;
|
||||
printMsg(lvlDebug, format("locking this thread to CPU %1%") % cpu);
|
||||
debug(format("locking this thread to CPU %1%") % 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);
|
||||
printError(format("failed to lock thread to CPU %1%") % cpu);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ void restoreAffinity()
|
|||
#if __linux__
|
||||
if (!didSaveAffinity) return;
|
||||
if (sched_setaffinity(0, sizeof(cpu_set_t), &savedAffinity) == -1)
|
||||
printMsg(lvlError, "failed to restore affinity %1%");
|
||||
printError("failed to restore affinity %1%");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue