posix-timers: Introduce clock_posix_cpu
authorThomas Gleixner <tglx@linutronix.de>
Tue, 1 Feb 2011 13:51:06 +0000 (13:51 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 2 Feb 2011 14:28:12 +0000 (15:28 +0100)
commit1976945eeaab5fa461735a6225a82c3cf1e65d62
treee718c8b8dd04ce7f2c2441aa69e7798a3d155f82
parent2fd1f04089cb657c5d6c484b280ec4d3398aa157
posix-timers: Introduce clock_posix_cpu

The CLOCK_DISPATCH() macro is a horrible magic. We call common
functions if a function pointer is not set. That's just backwards.

To support dynamic file decriptor based clocks we need to cleanup that
dispatch logic.

Create a k_clock struct clock_posix_cpu which has all the
posix-cpu-timer functions filled in. After the cleanup the functions
can be made static.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: John Stultz <johnstul@us.ibm.com>
Tested-by: Richard Cochran <richard.cochran@omicron.at>
LKML-Reference: <20110201134417.841974553@linutronix.de>
include/linux/posix-timers.h
kernel/posix-cpu-timers.c