aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorRichard Cochran <richardcochran@gmail.com>2011-02-01 08:52:26 -0500
committerThomas Gleixner <tglx@linutronix.de>2011-02-02 09:28:19 -0500
commitf1f1d5ebd10ffa4242bce7a90a56a222d6b7bc77 (patch)
treeca04ea979512e0037c52bca855dbf050b1b08360 /include/linux
parent65f5d80bdf83ec0d7f3887db10153bf3f36ed73c (diff)
posix-timers: Introduce a syscall for clock tuning.
A new syscall is introduced that allows tuning of a POSIX clock. The new call, clock_adjtime, takes two parameters, the clock ID and a pointer to a struct timex. Any ADJTIMEX(2) operation may be requested via this system call, but various POSIX clocks may or may not support tuning. [ tglx: Adapted to the posix-timer cleanup series. Avoid copy_to_user in the error case ] Signed-off-by: Richard Cochran <richard.cochran@omicron.at> Acked-by: John Stultz <johnstul@us.ibm.com> LKML-Reference: <20110201134419.869804645@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/posix-timers.h2
-rw-r--r--include/linux/syscalls.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h
index 8206255a547c..79a1cea7f6ed 100644
--- a/include/linux/posix-timers.h
+++ b/include/linux/posix-timers.h
@@ -4,6 +4,7 @@
4#include <linux/spinlock.h> 4#include <linux/spinlock.h>
5#include <linux/list.h> 5#include <linux/list.h>
6#include <linux/sched.h> 6#include <linux/sched.h>
7#include <linux/timex.h>
7 8
8union cpu_time_count { 9union cpu_time_count {
9 cputime_t cpu; 10 cputime_t cpu;
@@ -71,6 +72,7 @@ struct k_clock {
71 int (*clock_set) (const clockid_t which_clock, 72 int (*clock_set) (const clockid_t which_clock,
72 const struct timespec *tp); 73 const struct timespec *tp);
73 int (*clock_get) (const clockid_t which_clock, struct timespec * tp); 74 int (*clock_get) (const clockid_t which_clock, struct timespec * tp);
75 int (*clock_adj) (const clockid_t which_clock, struct timex *tx);
74 int (*timer_create) (struct k_itimer *timer); 76 int (*timer_create) (struct k_itimer *timer);
75 int (*nsleep) (const clockid_t which_clock, int flags, 77 int (*nsleep) (const clockid_t which_clock, int flags,
76 struct timespec *, struct timespec __user *); 78 struct timespec *, struct timespec __user *);
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 18cd0684fc4e..bfacab921239 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -311,6 +311,8 @@ asmlinkage long sys_clock_settime(clockid_t which_clock,
311 const struct timespec __user *tp); 311 const struct timespec __user *tp);
312asmlinkage long sys_clock_gettime(clockid_t which_clock, 312asmlinkage long sys_clock_gettime(clockid_t which_clock,
313 struct timespec __user *tp); 313 struct timespec __user *tp);
314asmlinkage long sys_clock_adjtime(clockid_t which_clock,
315 struct timex __user *tx);
314asmlinkage long sys_clock_getres(clockid_t which_clock, 316asmlinkage long sys_clock_getres(clockid_t which_clock,
315 struct timespec __user *tp); 317 struct timespec __user *tp);
316asmlinkage long sys_clock_nanosleep(clockid_t which_clock, int flags, 318asmlinkage long sys_clock_nanosleep(clockid_t which_clock, int flags,