]> git.baikalelectronics.ru Git - kernel.git/commit
hrtimers: extend hrtimer base code to handle more then 2 clockids
authorJohn Stultz <john.stultz@linaro.org>
Wed, 15 Dec 2010 03:37:07 +0000 (19:37 -0800)
committerJohn Stultz <john.stultz@linaro.org>
Mon, 21 Feb 2011 20:53:04 +0000 (12:53 -0800)
commit410e22d68328a97785989b71cc14b7a691a8df82
treeee541661450da71e204370c84a15bae64847c368
parent8471bdfa47e2060d82a500512fb609148e70e550
hrtimers: extend hrtimer base code to handle more then 2 clockids

The hrtimer code is written mainly with CLOCK_REALTIME and CLOCK_MONOTONIC
in mind. These are clockids 0 and 1 resepctively. However, if we are
to introduce any new hrtimer bases, using new clockids, we have to skip
the cputimers (clockids 2,3) as well as other clockids that may not impelement
timers.

This patch adds a little bit of indirection between the clockid and
the base, so that we can extend the base by one when we add
a new clockid at number 7 or so.

CC: Jamie Lokier <jamie@shareable.org>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Alexander Shishkin <virtuoso@slind.org>
CC: Arve Hjønnevåg <arve@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
include/linux/hrtimer.h
kernel/hrtimer.c