Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jun 2001 18:32:56 -0700
From:      "Jonathan Graehl" <>
To:        "'Dag-Erling Smorgrav'" <>
Cc:        <>
Subject:   RE: New kqueue filter
Message-ID:  <000001c101cd$c25728e0$>
In-Reply-To: <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
That's what I meant -

1) condition is satisfied, event is added to kqueue active list

2) Some more stuff happens, after which we might not want the event to
be returned to us any more (e.g.the data is read by some other process)

3) user process is woken up in kevent; kernel rescans active list to
remove no-longer-active events

See and

I think the second call is debatable as it doesn't necessarily save you
from races - but who knows; in some cases it may offer better
correctness or performance.

> -----Original Message-----
> From: owner-freebsd-arch@FreeBSD.ORG 
> [mailto:owner-freebsd-arch@FreeBSD.ORG] On Behalf Of 
> Dag-Erling Smorgrav
> Sent: Saturday, June 30, 2001 4:27 PM
> To: Jonathan Graehl
> Cc: arch@FreeBSD.ORG; jlemon@FreeBSD.ORG
> Subject: Re: New kqueue filter
> "Jonathan Graehl" <> writes:
> > Jonathan Lemon can speak to this better than I, but I 
> believe this is 
> > because kevents are supposed to be level and not 
> edge-sensitive (that 
> > is, "there is data waiting", not "data became available").  
> The filter 
> > would run the first time to place the event in the kqueue 
> tentatively, 
> > and then (some time later, when some other process could 
> have removed 
> > the event) when the user retrieves events with kevent, the 
> filters run 
> > again to verify that the condition still exists.
> No, the filter function isn't called at all until I actually 
> type something on the tty, then it runs (and succeeds) twice 
> in a row before the userland kqueue() call returns.
> -- 
> Dag-Erling Smorgrav -
> To Unsubscribe: send mail to
> with "unsubscribe freebsd-arch" in the body of the message

To Unsubscribe: send mail to
with "unsubscribe freebsd-arch" in the body of the message

Want to link to this message? Use this URL: <$c25728e0$6dfeac40>