1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 00:11:17 +02:00

libstore/globals.cc: Move cgroup detection to libutil

This commit is contained in:
Alex Wied 2022-07-19 02:09:46 -04:00
parent 1af5d798a4
commit 722de8ddcc
3 changed files with 60 additions and 48 deletions

View file

@ -182,6 +182,9 @@ std::string drainFD(int fd, bool block = true, const size_t reserveSize=0);
void drainFD(int fd, Sink & sink, bool block = true);
/* If cgroups are active, attempt to calculate the number of CPUs available.
If cgroups are unavailable or if cpu.max is set to "max", return 0. */
unsigned int getMaxCPU();
/* Automatic cleanup of resources. */