mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-05 22:12:16 +00:00
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>
This commit is contained in:
parent
65f5d80bdf
commit
f1f1d5ebd1
4 changed files with 57 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
|||
#include <linux/spinlock.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/timex.h>
|
||||
|
||||
union cpu_time_count {
|
||||
cputime_t cpu;
|
||||
|
@ -71,6 +72,7 @@ struct k_clock {
|
|||
int (*clock_set) (const clockid_t which_clock,
|
||||
const struct timespec *tp);
|
||||
int (*clock_get) (const clockid_t which_clock, struct timespec * tp);
|
||||
int (*clock_adj) (const clockid_t which_clock, struct timex *tx);
|
||||
int (*timer_create) (struct k_itimer *timer);
|
||||
int (*nsleep) (const clockid_t which_clock, int flags,
|
||||
struct timespec *, struct timespec __user *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue