diff options
| author | data-man <datamanrb@gmail.com> | 2019-12-06 06:29:23 +0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-01-05 16:52:36 -0500 |
| commit | 2f6b045fb13b6a49e5185fa0f4006bef1dacd0d7 (patch) | |
| tree | 2b4e3ba5b75276e3b1ee6ce2c9199efd5661856b /lib/std/os/bits/linux.zig | |
| parent | 62bebda270d44a163a69393c9e189c2b1811f023 (diff) | |
| download | zig-2f6b045fb13b6a49e5185fa0f4006bef1dacd0d7.tar.gz zig-2f6b045fb13b6a49e5185fa0f4006bef1dacd0d7.zip | |
Add std.os.getrusage
Diffstat (limited to 'lib/std/os/bits/linux.zig')
| -rw-r--r-- | lib/std/os/bits/linux.zig | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/std/os/bits/linux.zig b/lib/std/os/bits/linux.zig index 3fb160e3ec..6fa8bc1f36 100644 --- a/lib/std/os/bits/linux.zig +++ b/lib/std/os/bits/linux.zig @@ -1453,3 +1453,26 @@ pub const MFD_HUGE_512MB = HUGETLB_FLAG_ENCODE_512MB; pub const MFD_HUGE_1GB = HUGETLB_FLAG_ENCODE_1GB; pub const MFD_HUGE_2GB = HUGETLB_FLAG_ENCODE_2GB; pub const MFD_HUGE_16GB = HUGETLB_FLAG_ENCODE_16GB; + +pub const RUSAGE_SELF = 0; +pub const RUSAGE_CHILDREN = -1; +pub const RUSAGE_THREAD = 1; + +pub const rusage = extern struct { + utime: timeval, + stime: timeval, + maxrss: isize, + ix_rss: isize, + idrss: isize, + isrss: isize, + minflt: isize, + majflt: isize, + nswap: isize, + inblock: isize, + oublock: isize, + msgsnd: isize, + msgrcv: isize, + nsignals: isize, + nvcsw: isize, + nivcsw: isize, +}; |
