[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1327760814.5816.1.camel@lenny>
Date: Sat, 28 Jan 2012 09:26:54 -0500
From: Colin Walters <walters@...bum.org>
To: Bob Richmond <bob@...ez.org>
Cc: linux-kernel@...r.kernel.org
Subject: Re: Real time clock update notification
On Fri, 2012-01-27 at 14:52 -0800, Bob Richmond wrote:
> Is there any kind of facility for a process that is blocking in any one
> of the event notification system calls (select/poll/epoll_wait) to be
> unblocked in the event that the realtime clock has been updated? For
> instance, say I want to fire off an event at the exact moment that the
> realtime clock flips to 2pm. I first query the realtime clock via
> clock_gettime(CLOCK_REALTIME), and know that in 3 hours, it will be 2pm
> and I want to unblock at that moment. So I block in epoll_wait for 3 hours.
You're looking for "timerfd". Our use in GNOME is here:
http://git.gnome.org/browse/gnome-desktop/tree/libgnome-desktop/gnome-datetime-source.c
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists