From bb9a2bb62ed37f9b29c7ab4418b8b90417d1b2a2 Mon Sep 17 00:00:00 2001 From: Adin Scannell Date: Fri, 16 Nov 2018 12:16:37 -0800 Subject: Update futex to use usermem abstractions. This eliminates the indirection that existed in task_futex. PiperOrigin-RevId: 221832498 Change-Id: Ifb4c926d493913aa6694e193deae91616a29f042 --- pkg/sentry/mm/syscalls.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'pkg/sentry/mm') diff --git a/pkg/sentry/mm/syscalls.go b/pkg/sentry/mm/syscalls.go index a721cc456..9519c7390 100644 --- a/pkg/sentry/mm/syscalls.go +++ b/pkg/sentry/mm/syscalls.go @@ -794,10 +794,9 @@ func (mm *MemoryManager) Sync(ctx context.Context, addr usermem.Addr, length uin return nil } -// GetSharedFutexKey is used by kernel.futexChecker.GetSharedKey to implement -// futex.Checker.GetSharedKey. +// GetSharedFutexKey is used by kernel.Task.GetSharedKey. func (mm *MemoryManager) GetSharedFutexKey(ctx context.Context, addr usermem.Addr) (futex.Key, error) { - ar, ok := addr.ToRange(4) // sizeof(int32) + ar, ok := addr.ToRange(4) // sizeof(int32). if !ok { return futex.Key{}, syserror.EFAULT } -- cgit v1.2.3