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:
Dave Cheney
2015-10-08 03:55:53 +00:00
parent 342d6a85aa
commit 18d75a3b5e
7 changed files with 61 additions and 1 deletions
+1 -1
View File
@@ -886,6 +886,7 @@ func Getpgrp() (pid int) {
//sys Pause() (err error)
//sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
//sysnb prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) = SYS_PRLIMIT64
//sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)
//sys read(fd int, p []byte) (n int, err error)
//sys Removexattr(path string, attr string) (err error)
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
@@ -1022,7 +1023,6 @@ func Munmap(b []byte) (err error) {
// Personality
// Poll
// Ppoll
// Prctl
// Pselect6
// Ptrace
// Putpmsg