Date: Sat, 30 Jun 2001 18:32:56 -0700 From: "Jonathan Graehl" <jonathan@graehl.org> To: "'Dag-Erling Smorgrav'" <des@ofug.org> Cc: <arch@freebsd.org> Subject: RE: New kqueue filter Message-ID: <000001c101cd$c25728e0$6dfeac40@straylight.com> In-Reply-To: <xzp1yo1v99k.fsf@flood.ping.uio.no>
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 http://people.freebsd.org/~jlemon/kqueue_slides/sld024.htm and http://people.freebsd.org/~jlemon/kqueue_slides/sld025.htm 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" <jonathan@graehl.org> 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. > > DES > -- > Dag-Erling Smorgrav - des@ofug.org > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-arch" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000001c101cd$c25728e0$6dfeac40>