Subject: Re: no callout_stop? Re: callout_init ...
To: Chapman Flack <nblists@anastigmatix.net>
From: Matthew Orgass <darkstar@city-net.com>
List: tech-kern
Date: 01/06/2006 01:59:02
On 2006-01-04 nblists@anastigmatix.net wrote:
> Manuel Bouyer wrote:
> > It's luck. callouts needs to be stopped and freed explicitely before
> > the pointer passed to the callback is freed.
>
> Ah, kinda what I was thinking. I'm in the process of churning
> out patches to midi right now, so I'll include that.

  Note that callout_stop will not be sufficient on MP (post big-lock), as
it only prevents it from being called again and you also need to know that
all callouts are done executing.  Each driver must keep track of that.
It is necessary use callout_ack and avoid schedule while callout_invoking
for callout_stop to be safe to use on MP.  If the callout is only ever
used once at a time an alternative is to wait for it to die and never use
callout_stop.

  (Not saying that adding callout_stop wouldn't be an improvement if it
doesn't track callout completion...)

Matthew Orgass
darkstar@city-net.com