Messages in this thread | | | From | Arnd Bergmann <> | Subject | Re: [PATCHv6 1/7] notify userspace about time changes | Date | Thu, 11 Nov 2010 21:55:17 +0100 |
| |
On Thursday 11 November 2010 20:29:56 Alexander Shishkin wrote: > Certain userspace applications (like "clock" desktop applets or cron) might > want to be notified when some other application changes the system time. > There are several known to me reasons for this: > - avoiding periodic wakeups to poll time changes; > - changing system timekeeping policy for system-wide time management > programs; > - keeping guest applications/operating systems running in emulators > up to date. > > This patch implements a notification interface via eventfd mechanism. Proccess > wishing to be notified about time changes should create an eventfd and pass it > to time_change_notify() syscall. After that, any calls to settimeofday()/ > stime()/adjtimex() made by other processes will be signalled to this eventfd. > Credits for suggesting the eventfd mechanism for this purpose go to Kirill > Shutemov. > > This patch adds the syscall to asm-generic/unistd.h and a simple usage > example.
Looks reasonable to me.
It would be good to have the man page for this, too. I guess it could be added to the existing clock_{get,set}time man page, so you can add a patch for that.
Arnd
| |