From fe43b6c0fcad60713bddbc3b591dded5819e5987 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 1 Feb 2011 13:51:06 +0000 Subject: [PATCH] --- yaml --- r: 234592 b: refs/heads/master c: 1976945eeaab5fa461735a6225a82c3cf1e65d62 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/posix-timers.h | 2 ++ trunk/kernel/posix-cpu-timers.c | 12 ++++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 71ad41448834..467248e712f9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2fd1f04089cb657c5d6c484b280ec4d3398aa157 +refs/heads/master: 1976945eeaab5fa461735a6225a82c3cf1e65d62 diff --git a/trunk/include/linux/posix-timers.h b/trunk/include/linux/posix-timers.h index b2c14cbd47a6..1330ff331526 100644 --- a/trunk/include/linux/posix-timers.h +++ b/trunk/include/linux/posix-timers.h @@ -85,6 +85,8 @@ struct k_clock { struct itimerspec * cur_setting); }; +extern struct k_clock clock_posix_cpu; + void register_posix_clock(const clockid_t clock_id, struct k_clock *new_clock); /* error handlers for timer_create, nanosleep and settime */ diff --git a/trunk/kernel/posix-cpu-timers.c b/trunk/kernel/posix-cpu-timers.c index 11b91dc0992b..816cd49a5ad9 100644 --- a/trunk/kernel/posix-cpu-timers.c +++ b/trunk/kernel/posix-cpu-timers.c @@ -1604,6 +1604,18 @@ static long thread_cpu_nsleep_restart(struct restart_block *restart_block) return -EINVAL; } +struct k_clock clock_posix_cpu = { + .clock_getres = posix_cpu_clock_getres, + .clock_set = posix_cpu_clock_set, + .clock_get = posix_cpu_clock_get, + .timer_create = posix_cpu_timer_create, + .nsleep = posix_cpu_nsleep, + .nsleep_restart = posix_cpu_nsleep_restart, + .timer_set = posix_cpu_timer_set, + .timer_del = posix_cpu_timer_del, + .timer_get = posix_cpu_timer_get, +}; + static __init int init_posix_cpu_timers(void) { struct k_clock process = {