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
Showing
- include/linux/posix-timers.h 5 additions, 4 deletionsinclude/linux/posix-timers.h
- kernel/time/alarmtimer.c 43 additions, 46 deletionskernel/time/alarmtimer.c
- kernel/time/posix-clock.c 1 addition, 1 deletionkernel/time/posix-clock.c
- kernel/time/posix-cpu-timers.c 13 additions, 21 deletionskernel/time/posix-cpu-timers.c
- kernel/time/posix-timers.c 89 additions, 102 deletionskernel/time/posix-timers.c
Loading
Please register or sign in to comment