summaryrefslogtreecommitdiff
path: root/src/lib/syscall/proc_linux.go
diff options
context:
space:
mode:
authorDavid Symonds <dsymonds@golang.org>2009-05-26 20:38:57 -0700
committerDavid Symonds <dsymonds@golang.org>2009-05-26 20:38:57 -0700
commitdf199034a7421a501fd63c9c0fa3eed9a10c8d75 (patch)
tree196e47773ef7e032738eeda17d194daf64c0a509 /src/lib/syscall/proc_linux.go
parent18ad7e8decfb5ce21d9386bdec846214f6c1eb21 (diff)
downloadgolang-df199034a7421a501fd63c9c0fa3eed9a10c8d75.tar.gz
Getrusage for linux.
R=rsc APPROVED=rsc DELTA=40 (38 added, 0 deleted, 2 changed) OCL=29351 CL=29422
Diffstat (limited to 'src/lib/syscall/proc_linux.go')
-rw-r--r--src/lib/syscall/proc_linux.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/syscall/proc_linux.go b/src/lib/syscall/proc_linux.go
new file mode 100644
index 000000000..e4e376081
--- /dev/null
+++ b/src/lib/syscall/proc_linux.go
@@ -0,0 +1,19 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package syscall
+
+// Process operations for Linux
+// TODO:
+// - getrlimit, setrlimit
+
+import (
+ "syscall";
+ "unsafe";
+)
+
+func Getrusage(who int64, usage *Rusage) (ret, errno int64) {
+ r1, r2, err := Syscall(SYS_GETRUSAGE, who, int64(uintptr(unsafe.Pointer(usage))), 0);
+ return r1, err
+}