Subject: Re: Proposal for generic kernel event framework
To: Chris G. Demetriou <>
From: Jason Thorpe <>
List: tech-kern
Date: 01/26/1999 01:41:11
On 25 Jan 1999 21:59:32 -0800 (Chris G. Demetriou) wrote:

 > It would seem that, for instance, you intend this to be used for APM
 > event notification.  However, in that case, you really do want to
 > ability to say "not right now," i.e. a disk is busy and knows that it
 > (maybe) can't be (safely) suspended right now, so it can say "eee,
 > don't do that!" to a syspend event.


Okay... it seems to me that this could be handled by putting a
barrier in the kevent_server.  I.e. for every listener which gets
the message, the barrier is incremented.  When each listener says
"yah, ok, clear, go for it", the barrier is decremented.  When the
barrier reaches 0, the server can go forward.

Obviously, this would require that things which use barrier
synchronization send events from a valid thread context, so they
could tsleep().

Sorry, just bouncing this idea around... I'm tired, and need to stop
working for the night :-)

        -- Jason R. Thorpe <>