diff options
Diffstat (limited to 'libgo/syscalls/syscall_unix.go')
-rw-r--r-- | libgo/syscalls/syscall_unix.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libgo/syscalls/syscall_unix.go b/libgo/syscalls/syscall_unix.go index b5a660e93d1..e633ea19146 100644 --- a/libgo/syscalls/syscall_unix.go +++ b/libgo/syscalls/syscall_unix.go @@ -56,3 +56,12 @@ func munmap(addr uintptr, length uintptr) (errno int) { } return } + +func libc_getrusage(who int, rusage *Rusage) int __asm__ ("getrusage") + +func Getrusage(who int, rusage *Rusage) (errno int) { + if libc_getrusage(who, rusage) < 0 { + errno = GetErrno() + } + return +} |