Re: [PATCH 4/4] timers: posix interface for alarm-timers

From: Richard Cochran
Date: Wed Apr 20 2011 - 02:34:58 EST


On Tue, Apr 19, 2011 at 04:58:30PM -0700, John Stultz wrote:
> This patch exposes alarm-timers to userland via the posix clock
> and timers interface, using two new clockids: CLOCK_REALTIME_ALARM
> and CLOCK_BOOTTIME_ALARM. Both clockids behave identically to
> CLOCK_REALTIME and CLOCK_BOOTTIME, respectively, but timers
> set against the _ALARM suffixed clockids will wake the system if
> it is suspended.

So, is there reason these cannot or should not be using the dynamic
posix clock interface?

> The semantics of the Android alarm driver are different from what
> this posix interface provides.
...
> One potential way to implement similar semantics may be via
> the timerfd infrastructure, but this needs more research.
>
> There may also need to be some sort of sysfs system level policy
> hooks that allow alarm timers to be disabled to keep them
> from firing at inappropriate times (ie: laptop in a well insulated
> bag, mid-flight).

I have not put hardly any thought into these issues, but the dynamic
interface gives you a character device at no extra charge.

Richard
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/