[lkml]   [2010]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1/7] notify userspace about time changes
On Fri, 2010-09-17 at 01:10 +0300, 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. It
> might also be important for an application to be able to distinguish between
> its own and somebody else's time changes.
> 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 along with notification options.
> 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.

One thing I have thought of since the last time you posted this, maybe
it would be worth adding a clockid field to the syscall?

Basically, we're looking at extending the posix clocks interfaces to
allow for additional clock hardware to be exposed (See the discussion on
PTP and my CLOCK_RTC patch today for examples and details).

So it seems possible that folks would want a similar interface to catch
updates to non CLOCK_REALTIME clocks.

Does this seem reasonable?


 \ /
  Last update: 2010-09-17 00:33    [W:0.290 / U:5.572 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site