aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/posix-timers.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-05-26 12:03:11 +0300
committerThomas Gleixner <tglx@linutronix.de>2017-05-27 09:46:35 +0200
commitd3ba5a9a345b1243276f8a982e1bce557c2504fd (patch)
tree1642ba9e97ef835cc51f87fbad312f0af3a8f526 /include/linux/posix-timers.h
parentmmtimer: Remove the SGI SN2 mmtimer driver (diff)
downloadlinux-dev-d3ba5a9a345b1243276f8a982e1bce557c2504fd.tar.xz
linux-dev-d3ba5a9a345b1243276f8a982e1bce557c2504fd.zip
posix-timers: Make posix_clocks immutable
There are no more modular users providing a posix clock. The register function is now pointless so the posix clock array can be initialized statically at compile time and the array including the various k_clock structs can be marked 'const'. Inspired by changes in the Grsecurity patch set, but done proper. [ tglx: Massaged changelog and fixed the POSIX_TIMER=n case ] Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Mike Travis <mike.travis@hpe.com> Cc: Dimitri Sivanich <sivanich@hpe.com> Link: http://lkml.kernel.org/r/20170526090311.3377-3-hch@lst.de
Diffstat (limited to 'include/linux/posix-timers.h')
-rw-r--r--include/linux/posix-timers.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h
index 8c1e43ab14a9..b313ef2e7385 100644
--- a/include/linux/posix-timers.h
+++ b/include/linux/posix-timers.h
@@ -105,10 +105,11 @@ struct k_clock {
struct itimerspec64 *cur_setting);
};
-extern struct k_clock clock_posix_cpu;
-extern struct k_clock clock_posix_dynamic;
-
-void posix_timers_register_clock(const clockid_t clock_id, struct k_clock *new_clock);
+extern const struct k_clock clock_posix_cpu;
+extern const struct k_clock clock_posix_dynamic;
+extern const struct k_clock clock_process;
+extern const struct k_clock clock_thread;
+extern const struct k_clock alarm_clock;
/* function to call to trigger timer event */
int posix_timer_event(struct k_itimer *timr, int si_private);