Re: kqueue()/kevent(), select() and poll()

2000-11-19 Thread Doug White

On Sat, 18 Nov 2000, Maxime Henrion wrote:

>   Hi,
> 
> I was wondering if it was reasonnable to implement the select() and poll()
> system calls as kqueue()/kevent() wrappers. This would make any application
> using these system calls benefit from the performance improvements of the new
> kernel thread.
> 
> Do you think it's possible and that it won't cause some portability problems ?

Also, select() works on more descriptors than kqueue/kevent() does
currently (i.e. NFS).

Doug White|  FreeBSD: The Power to Serve
[EMAIL PROTECTED] |  www.FreeBSD.org



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: kqueue()/kevent(), select() and poll()

2000-11-18 Thread Alfred Perlstein

* Maxime Henrion <[EMAIL PROTECTED]> [001118 06:03] wrote:
>   Hi,
> 
> I was wondering if it was reasonnable to implement the select() and poll()
> system calls as kqueue()/kevent() wrappers. This would make any application
> using these system calls benefit from the performance improvements of the new
> kernel thread.
> 
> Do you think it's possible and that it won't cause some portability problems ?

It would just cause more overhead.  To implement select()/poll() using
kevent would necessitate building up an eventlist that was comprised of
EVFILT_ONESHOT events, then after return or timeout clearing the
events that hadn't fired.

-- 
-Alfred Perlstein - [[EMAIL PROTECTED]|[EMAIL PROTECTED]]
"I have the heart of a child; I keep it in a jar on my desk."


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message