mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
std.c: add rusage for dragonfly, netbsd, openbsd
This commit is contained in:
parent
9eed87f93e
commit
2659fadb95
1 changed files with 22 additions and 1 deletions
|
|
@ -4471,7 +4471,7 @@ 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 {
|
.freebsd, .openbsd => extern struct {
|
||||||
utime: timeval,
|
utime: timeval,
|
||||||
stime: timeval,
|
stime: timeval,
|
||||||
maxrss: c_long,
|
maxrss: c_long,
|
||||||
|
|
@ -4493,6 +4493,27 @@ pub const rusage = switch (native_os) {
|
||||||
pub const CHILDREN = -1;
|
pub const CHILDREN = -1;
|
||||||
pub const THREAD = 1;
|
pub const THREAD = 1;
|
||||||
},
|
},
|
||||||
|
.dragonfly, .netbsd => 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;
|
||||||
|
},
|
||||||
else => void,
|
else => void,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue