authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-10-15 20:49:54-04:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2020-10-15 20:49:54-04:00
loga66449c1edbd14f66cb0a87316d16f26121af353
tree701e2259d0fd86b2ca657fa80e293311025a6c5f
parentee0ba9ec7d4ae61a688431d054a715559b8e0dd7
parent9de0f15b8e4040921277b55e3b26d76ce1492e0f
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

Merge pull request #6616 from fengb/darwin-rusage

Darwin rusage

2 files changed, 23 insertions(+), 1 deletions(-)

lib/std/os/bits/darwin.zig+22
......@@ -1474,3 +1474,25 @@ pub const CLOCK_UPTIME_RAW = 8;
14741474pub const CLOCK_UPTIME_RAW_APPROX = 9;
14751475pub const CLOCK_PROCESS_CPUTIME_ID = 12;
14761476pub const CLOCK_THREAD_CPUTIME_ID = 16;
1477
1478pub const RUSAGE_SELF = 0;
1479pub const RUSAGE_CHILDREN = -1;
1480
1481pub const rusage = extern struct {
1482 utime: timeval,
1483 stime: timeval,
1484 maxrss: isize,
1485 ixrss: isize,
1486 idrss: isize,
1487 isrss: isize,
1488 minflt: isize,
1489 majflt: isize,
1490 nswap: isize,
1491 inblock: isize,
1492 oublock: isize,
1493 msgsnd: isize,
1494 msgrcv: isize,
1495 nsignals: isize,
1496 nvcsw: isize,
1497 nivcsw: isize,
1498};
lib/std/os/bits/linux.zig+1-1
......@@ -1769,7 +1769,7 @@ pub const rusage = extern struct {
17691769 utime: timeval,
17701770 stime: timeval,
17711771 maxrss: isize,
1772 ix_rss: isize,
1772 ixrss: isize,
17731773 idrss: isize,
17741774 isrss: isize,
17751775 minflt: isize,