mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-27 13:54:19 +08:00
syscall: add prlimit
As of https://go.dev/cl/476695 golang.org/x/sys/unix can call syscall.prlimit, so we need such a function in libgo.
This commit is contained in:
parent
16a76499f9
commit
52b222ac0a
@ -188,6 +188,14 @@ func Gettid() (tid int) {
|
||||
//sys PivotRoot(newroot string, putold string) (err error)
|
||||
//pivot_root(newroot *byte, putold *byte) _C_int
|
||||
|
||||
// Used by golang.org/x/sys/unix.
|
||||
//sys prlimit(pid int, resource int, newlimit *Rlimit, oldlimit *Rlimit) (err error)
|
||||
//prlimit(pid Pid_t, resource _C_int, newlimit *Rlimit, oldlimit *Rlimit) _C_int
|
||||
|
||||
func Prlimit(pid int, resource int, newlimit *Rlimit, oldlimit *Rlimit) error {
|
||||
return prlimit(pid, resource, newlimit, oldlimit)
|
||||
}
|
||||
|
||||
//sys Removexattr(path string, attr string) (err error)
|
||||
//removexattr(path *byte, name *byte) _C_int
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user