Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jan 2010 16:33:27 +0100
From:      Ivan Voras <ivoras@freebsd.org>
To:        freebsd-hackers@freebsd.org
Subject:   Re: Greetings... a patch I would like your comments on...
Message-ID:  <hjcgfv$100$1@ger.gmane.org>
In-Reply-To: <20100122151035.GX77705@hoeg.nl>
References:  <AD99639C-0DC6-4C4C-B945-A8BD23D6DF8E@lakerest.net>	<9bbcef731001220527u5bbec479n59143b6631c6e2d8@mail.gmail.com> <20100122151035.GX77705@hoeg.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On 01/22/10 16:10, Ed Schouten wrote:
> * Ivan Voras<ivoras@freebsd.org>  wrote:
>> This is a good and useful addition! I think Windows has implemented a
>> generalization of this (called "wait objects" or something like that),
>> which effectively allows a select()- (or in this case kqueue())-like
>> syscall to wait on both file descriptors and condvars (as well as
>> probably other MS-style objects). It's useful for multiplexing events
>> for dissimilar sources.
>
> NtWaitForSingleObject(), NtWaitForMultipleObjects(), etc. :-)
>

Yes, I was thinking about WaitForMultipleObjects() - I sometimes wished 
I had it in FreeBSD :)

I think the hackers@ side of the thread is missing the original link to 
the patch file offered for review, so here it is:

http://people.freebsd.org/~rrs/kque_umtx.patch

My kqueue-fu level is too low to be really useful here but from what 
I've read it looks like a logical and even reasonably clean way of doing it.

If I read the comment at filt_umtxattach() correctly, in the best case 
you would need an extension to the kevent structure to add more fields 
like data & udata (for passing values back and forth between userland 
and kernel). I agree with this - it would be very convenient for some 
future purposes (like file modification notification) if the kernel 
filter could both accept and return a struct of data from/to the userland.






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?hjcgfv$100$1>