aboutsummaryrefslogtreecommitdiff
path: root/src/syscall/syscall_linux_mips64x.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/syscall/syscall_linux_mips64x.go')
-rw-r--r--src/syscall/syscall_linux_mips64x.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/syscall/syscall_linux_mips64x.go b/src/syscall/syscall_linux_mips64x.go
index 258eb97b7e..b03ca2eb9d 100644
--- a/src/syscall/syscall_linux_mips64x.go
+++ b/src/syscall/syscall_linux_mips64x.go
@@ -6,6 +6,10 @@
package syscall
+import (
+ "unsafe"
+)
+
const _SYS_setgroups = SYS_SETGROUPS
//sys Dup2(oldfd int, newfd int) (err error)
@@ -30,7 +34,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 Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
//sys Statfs(path string, buf *Statfs_t) (err error)
@@ -86,6 +90,12 @@ func Time(t *Time_t) (tt Time_t, err error) {
//sys Utime(path string, buf *Utimbuf) (err error)
//sys utimes(path string, times *[2]Timeval) (err error)
+//go:nosplit
+func rawSetrlimit(resource int, rlim *Rlimit) Errno {
+ _, _, errno := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
+ return errno
+}
+
func setTimespec(sec, nsec int64) Timespec {
return Timespec{Sec: sec, Nsec: nsec}
}