aboutsummaryrefslogtreecommitdiff
path: root/src/syscall/syscall_linux_s390x.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/syscall/syscall_linux_s390x.go')
-rw-r--r--src/syscall/syscall_linux_s390x.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/syscall/syscall_linux_s390x.go b/src/syscall/syscall_linux_s390x.go
index 46b252dc95..77f2b9d0c6 100644
--- a/src/syscall/syscall_linux_s390x.go
+++ b/src/syscall/syscall_linux_s390x.go
@@ -33,7 +33,7 @@ const _SYS_setgroups = SYS_SETGROUPS
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys Setfsgid(gid int) (err error)
//sys Setfsuid(uid int) (err error)
-//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
+//sysnb setrlimit(resource int, rlim *Rlimit) (err error) = SYS_SETRLIMIT
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
//sys Stat(path string, stat *Stat_t) (err error)
//sys Statfs(path string, buf *Statfs_t) (err error)
@@ -240,6 +240,12 @@ func Shutdown(s, how int) (err error) {
return
}
+//go:nosplit
+func rawSetrlimit(resource int, rlim *Rlimit) Errno {
+ _, _, errno := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
+ return errno
+}
+
func (r *PtraceRegs) PC() uint64 { return r.Psw.Addr }
func (r *PtraceRegs) SetPC(pc uint64) { r.Psw.Addr = pc }