posix clocks: Introduce dynamic clocks
authorRichard Cochran <richardcochran@gmail.com>
Tue, 1 Feb 2011 13:52:35 +0000 (13:52 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 2 Feb 2011 14:28:20 +0000 (15:28 +0100)
commit0606f422b453f76c31ab2b1bd52943ff06a2dcf2
tree14f4859e8492f01e97140248a28ab98355c415cf
parent527087374faa488776a789375a7d6ea74fda6f71
posix clocks: Introduce dynamic clocks

This patch adds support for adding and removing posix clocks. The
clock lifetime cycle is patterned after usb devices. Each clock is
represented by a standard character device. In addition, the driver
may optionally implement custom character device operations.

The posix clock and timer system calls listed below now work with
dynamic posix clocks, as well as the traditional static clocks.
The following system calls are affected:

   - clock_adjtime (brand new syscall)
   - clock_gettime
   - clock_getres
   - clock_settime
   - timer_create
   - timer_delete
   - timer_gettime
   - timer_settime

[ tglx: Adapted to the posix-timer cleanup. Moved clock_posix_dynamic
   to posix-clock.c and made all referenced functions static ]

Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Acked-by: John Stultz <johnstul@us.ibm.com>
LKML-Reference: <20110201134420.164172635@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
include/linux/posix-clock.h [new file with mode: 0644]
include/linux/posix-timers.h
kernel/posix-timers.c
kernel/time/Makefile
kernel/time/posix-clock.c [new file with mode: 0644]