diff options
author | Adin Scannell <ascannell@google.com> | 2018-11-16 12:16:37 -0800 |
---|---|---|
committer | Nicolas Lacasse <nlacasse@google.com> | 2018-11-20 14:02:07 -0800 |
commit | bb9a2bb62ed37f9b29c7ab4418b8b90417d1b2a2 (patch) | |
tree | df790035bda57dd2d60d69f8d67306b8fd135f69 /pkg/sentry/mm/syscalls.go | |
parent | 45f4b90d4f6fc5bdaaaa35f677340860a2c1029c (diff) |
Update futex to use usermem abstractions.
This eliminates the indirection that existed in task_futex.
PiperOrigin-RevId: 221832498
Change-Id: Ifb4c926d493913aa6694e193deae91616a29f042
Diffstat (limited to 'pkg/sentry/mm/syscalls.go')
-rw-r--r-- | pkg/sentry/mm/syscalls.go | 5 |
1 files changed, 2 insertions, 3 deletions
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 } |