summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/syscalls/linux/sys_sem.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-01-08 04:59:00 +0000
committergVisor bot <gvisor-bot@google.com>2021-01-08 04:59:00 +0000
commit5b5d2f473597a9ccc644ee4bf7370147397f0853 (patch)
tree95d782d284ab4e18269954a105761c1c6765dbc7 /pkg/sentry/syscalls/linux/sys_sem.go
parentc29cd7658b69ef231ca851e3dda1160f602bb127 (diff)
parentbf343394d4988c01461b59b6b05bc508f26855eb (diff)
Merge release-20201216.0-72-gbf343394d (automated)
Diffstat (limited to 'pkg/sentry/syscalls/linux/sys_sem.go')
-rw-r--r--pkg/sentry/syscalls/linux/sys_sem.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/sentry/syscalls/linux/sys_sem.go b/pkg/sentry/syscalls/linux/sys_sem.go
index 1166cd7bb..d324461a3 100644
--- a/pkg/sentry/syscalls/linux/sys_sem.go
+++ b/pkg/sentry/syscalls/linux/sys_sem.go
@@ -48,6 +48,15 @@ func Semget(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.Syscal
return uintptr(set.ID), nil, nil
}
+// Semtimedop handles: semop(int semid, struct sembuf *sops, size_t nsops, const struct timespec *timeout)
+func Semtimedop(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error) {
+ // TODO(gvisor.dev/issue/137): A non-zero timeout isn't supported.
+ if args[3].Pointer() != 0 {
+ return 0, nil, syserror.ENOSYS
+ }
+ return Semop(t, args)
+}
+
// Semop handles: semop(int semid, struct sembuf *sops, size_t nsops)
func Semop(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error) {
id := args[0].Int()