tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Waking up kevent



On Wed Apr 09 2008 at 11:11:19 +0100, Adam Panayis wrote:
> Hi, I am using kqueues and am after some advice on the following.
> 
> I initialize an array of kevent structs using EV_SET and set kevent to 
> wait for events.
> 
> I then initialise a new kevent struct for another directory and add it 
> to the original array.
> 
> I then need to reload my array into the waiting kevent call.
> 
> I would like to avoid using a timer as I do not want my program looping 
> round and round.
> 
> Is there a way to either: post a dummy message to the queue, or to 
> cancel the waiting kevent call so that I can reload my array when I 
> decide to?

See a tech-kern thread with the title "interrupting kevent" from October.

Short answer: no, you can't wake up kevent currently without a dummy
message which you will have to then process.

-- 
Antti Kantee <pooka%iki.fi@localhost>                     Of course he runs 
NetBSD
http://www.iki.fi/pooka/                          http://www.NetBSD.org/
    "la qualité la plus indispensable du cuisinier est l'exactitude"


Home | Main Index | Thread Index | Old Index