mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-02 15:17:31 -04:00
unix: add Prctl for linux platforms
Adds Prctl syscall for linux platforms. syscall and x/sys/unix already defined the PR_ series of constants. See discussion: https://groups.google.com/forum/#!topic/golang-nuts/rG6xShds2Dc Change-Id: Ida5562b46abef574a3f9ac31911142f1e8d7fb4f Reviewed-on: https://go-review.googlesource.com/15520 Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
@@ -788,6 +788,16 @@ func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
|
||||
_, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
|
||||
if e1 != 0 {
|
||||
err = errnoErr(e1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func read(fd int, p []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(p) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user