On Friday 30 November 2007, Pavel Machek wrote:...It's not an issue of accidental writes, it's an issue of there beingWe have 3 interfaces to one hardware resource. I do not think kernel
no other synchronization for setting those alarms. Remember that both
RTC_WKALM_SET and RTC_ALM_SET ioctls can set that same alarm, and so
could a different userspace activity ...
should try to arbitrate it here. There's just one alarm clock with
three interfaces.
Having three interfaces is bad enough ... ensuring that none of
them can ever be used safely would be stupid.
As written, this allows one userspace activity to clobber another ifWell, I could not get it to work with this "avoid-clobber" feature.
it does so explicitly, by first disabling the other one and then
setting its own alarm. But the idea is to minimize "accidents" like
unintentionally clobbering an alarm set by someone else.
I had earlier pointed out a different issue, whereby "oneshot"
semantics weren't consistently followed. I've been working on
some patches to address that. The ACPI bits still need work,
but I'll forward one part soonish.
If I remove "accidental alarm modify" logic, I can actually use rtc toEvidently the alarm isn't being disabled then...
wake up more than once per boot.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
That's the issue addressed by those patches. (Specific to rtc-cmos,
not to RTCs on saner hardware.)
I think we should just remove the 'avoid-clobber' logic. If userland
wants to somehow arbitrate access, it can.
Pray tell, *HOW* could it arbitrate?