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:
parent
1af5d798a4
commit
722de8ddcc
3 changed files with 60 additions and 48 deletions
|
@ -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. */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue