mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-23 14:36:16 +02:00
f4ab297b31
`///@file` makes them show up in the internal API dos. A tiny few were missing `#pragma once`.
32 lines
599 B
C++
32 lines
599 B
C++
#pragma once
|
|
///@file
|
|
|
|
#if __linux__
|
|
|
|
#include <chrono>
|
|
#include <optional>
|
|
|
|
#include "types.hh"
|
|
|
|
namespace nix {
|
|
|
|
std::optional<Path> getCgroupFS();
|
|
|
|
std::map<std::string, std::string> getCgroups(const Path & cgroupFile);
|
|
|
|
struct CgroupStats
|
|
{
|
|
std::optional<std::chrono::microseconds> cpuUser, cpuSystem;
|
|
};
|
|
|
|
/**
|
|
* Destroy the cgroup denoted by 'path'. The postcondition is that
|
|
* 'path' does not exist, and thus any processes in the cgroup have
|
|
* been killed. Also return statistics from the cgroup just before
|
|
* destruction.
|
|
*/
|
|
CgroupStats destroyCgroup(const Path & cgroup);
|
|
|
|
}
|
|
|
|
#endif
|