Skip to content
Snippets Groups Projects
Commit 5c5f5971 authored by Nadav Har'El's avatar Nadav Har'El Committed by Pekka Enberg
Browse files

clock: relative-time clock_event::set()


OSv's timer mechanism hinges on the Local APIC's (per-cpu) one-shot timer,
which delivers an interrupt after the requested number of nanoseconds.

The API to set this timer, clock_event::set(), took the absolute time of
the next interrupt. However, what it really needs is the duration in
nanoseconds until the next interrupt.

So this patch we change the basic clock_event::set() API to take a
duration, and implement the original clock_event::set(s64) - taking an s64
absolute wall-clock time - as a simple wrapper.  The next patch will add
more wrappers for set() taking absolute times from different clocks.
Later patches in this series will stop using the old set(s64) version,
until it is dropped in the end of the series.

Reviewed-by: default avatarGlauber Costa <glommer@cloudius-systems.com>
Signed-off-by: default avatarNadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
parent e1c4aa82
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment