mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03:00
std.c: implement rusage for freebsd
Reference: https://github.com/freebsd/freebsd-src/blob/e0c41af9256b5c5a6c97c85d468ff734e29f1bd5/sys/sys/resource.h#L70
This commit is contained in:
committed by
Alex Rønne Petersen
parent
6ecf497714
commit
d07360f999
@@ -4466,6 +4466,28 @@ pub const rusage = switch (native_os) {
|
||||
pub const SELF = 1;
|
||||
pub const CHILDREN = 2;
|
||||
},
|
||||
.freebsd => extern struct {
|
||||
utime: timeval,
|
||||
stime: timeval,
|
||||
maxrss: c_long,
|
||||
ixrss: c_long,
|
||||
idrss: c_long,
|
||||
isrss: c_long,
|
||||
minflt: c_long,
|
||||
majflt: c_long,
|
||||
nswap: c_long,
|
||||
inblock: c_long,
|
||||
oublock: c_long,
|
||||
msgsnd: c_long,
|
||||
msgrcv: c_long,
|
||||
nsignals: c_long,
|
||||
nvcsw: c_long,
|
||||
nivcsw: c_long,
|
||||
|
||||
pub const SELF = 0;
|
||||
pub const CHILDREN = -1;
|
||||
pub const THREAD = 1;
|
||||
},
|
||||
else => void,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user