aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/posix-timers.c
diff options
context:
space:
mode:
authorRichard Cochran <richard.cochran@omicron.at>2011-02-01 08:52:32 -0500
committerThomas Gleixner <tglx@linutronix.de>2011-02-02 09:28:19 -0500
commit81e294cba2596f5f10848bbe19d98b344c2a2d5c (patch)
tree4334ced22eff475275a81f7e62f1f5e9df43a433 /kernel/posix-timers.c
parentce26efdefa5e8f22d933df72d7f7482725091d6d (diff)
posix-timers: Add support for fd based clocks
Extend the negative clockids which are currently used by posix cpu timers to encode the PID with a file descriptor based type which encodes the fd in the upper bits. Originally-from: Richard Cochran <richard.cochran@omicron.at> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: John Stultz <johnstul@us.ibm.com> LKML-Reference: <20110201134420.062860200@linutronix.de>
Diffstat (limited to 'kernel/posix-timers.c')
-rw-r--r--kernel/posix-timers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c
index 5a5a4f1c0971..df629d853a81 100644
--- a/kernel/posix-timers.c
+++ b/kernel/posix-timers.c
@@ -488,7 +488,7 @@ static void release_posix_timer(struct k_itimer *tmr, int it_id_set)
488static struct k_clock *clockid_to_kclock(const clockid_t id) 488static struct k_clock *clockid_to_kclock(const clockid_t id)
489{ 489{
490 if (id < 0) 490 if (id < 0)
491 return &clock_posix_cpu; 491 return (id & CLOCKFD_MASK) == CLOCKFD ? NULL : &clock_posix_cpu;
492 492
493 if (id >= MAX_CLOCKS || !posix_clocks[id].clock_getres) 493 if (id >= MAX_CLOCKS || !posix_clocks[id].clock_getres)
494 return NULL; 494 return NULL;