lkml.org 
[lkml]   [2010]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCHv6 1/7] notify userspace about time changes
Date
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


\
 
 \ /
  Last update: 2010-11-11 21:57    [W:0.311 / U:0.624 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site