diff options
author | Adrien Leravat <Pixep@users.noreply.github.com> | 2019-06-21 22:40:16 -0700 |
---|---|---|
committer | Adrien Leravat <Pixep@users.noreply.github.com> | 2019-06-24 21:14:38 -0700 |
commit | 3688e6e99d16b0c6ecb7c8b3528a541ce6afe3a7 (patch) | |
tree | 594793c2f2fb2fc702cfa22ee57b3ad902219181 /pkg/sentry/syscalls/linux/sys_timerfd.go | |
parent | e9ea7230f7dc70d3e1bb5ae32b6927209cafb465 (diff) |
Add CLOCK_BOOTTIME as a CLOCK_MONOTONIC alias
Makes CLOCK_BOOTTIME available with
* clock_gettime
* timerfd_create
* clock_gettime vDSO
CLOCK_BOOTTIME is implemented as an alias to CLOCK_MONOTONIC.
CLOCK_MONOTONIC already keeps track of time across save
and restore. This is the closest possible behavior to Linux
CLOCK_BOOTIME, as there is no concept of suspend/resume.
Updates google/gvisor#218
Diffstat (limited to 'pkg/sentry/syscalls/linux/sys_timerfd.go')
-rw-r--r-- | pkg/sentry/syscalls/linux/sys_timerfd.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/syscalls/linux/sys_timerfd.go b/pkg/sentry/syscalls/linux/sys_timerfd.go index ea6d44315..b889a2a93 100644 --- a/pkg/sentry/syscalls/linux/sys_timerfd.go +++ b/pkg/sentry/syscalls/linux/sys_timerfd.go @@ -38,7 +38,7 @@ func TimerfdCreate(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel switch clockID { case linux.CLOCK_REALTIME: c = t.Kernel().RealtimeClock() - case linux.CLOCK_MONOTONIC: + case linux.CLOCK_MONOTONIC, linux.CLOCK_BOOTTIME: c = t.Kernel().MonotonicClock() default: return 0, nil, syserror.EINVAL |