std.c: implement rusage for freebsd

Reference: e0c41af925/sys/sys/resource.h (L70)
This commit is contained in:
Meghan Denny 2025-11-15 15:17:15 -08:00 committed by Alex Rønne Petersen
parent 6ecf497714
commit d07360f999

View File

@ -4466,6 +4466,28 @@ pub const rusage = switch (native_os) {
pub const SELF = 1; pub const SELF = 1;
pub const CHILDREN = 2; 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, else => void,
}; };