[LinuxPPS] safe pps_register_source()
Fabio Checconi
fchecconi at gmail.com
Thu Aug 9 16:24:53 CEST 2007
On Thu, Aug 09, 2007 at 03:51:08PM +0200, Rodolfo Giometti wrote:
> On Thu, Aug 09, 2007 at 09:40:41AM -0400, Fabio Checconi wrote:
> >
> > I think we need something to prevent the deregistration of the
[...]
>
> Mmm... I see... so your suggestion is to use an "usage" count and
> deregistering the source only when it reachs zero?
>
yes, if, when you try to unregister the source, it has a nonzero
usage count you wait until all the tasks waiting for it are
resumed, otherwise you unregister the source immediately.
> > I think we need to leave to the task(s) doing fetch to wake up
> > anyone waiting to do source deregistration.
>
> And about the pps_event()? Don't you think that also this function
> should be considered?
>
yes, on smp systems it can be a problem. btw sleeping to wait for
the end of an interrupt handler seems to me a little bit excessive,
I don't know how those things are handled in other drivers, I'll
take a look at them.
regards,
fabio
More information about the LinuxPPS
mailing list