Date: Thu, 27 Jul 2000 17:54:47 -0400 (EDT) From: Daniel Eischen <eischen@vigrid.com> To: Doug White <dwhite@resnet.uoregon.edu> Cc: =?Windows-1252?Q?Nicolas_L=E9onard?= <nicolas.leonard@animaths.com>, hackers@FreeBSD.ORG Subject: Re: kevent()/kqueue() in a multithreaded environment Message-ID: <Pine.SUN.3.91.1000727174628.1898A-100000@pcnet1.pcnet.com> In-Reply-To: <Pine.BSF.4.21.0007271246160.56534-100000@resnet.uoregon.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 27 Jul 2000, Doug White wrote: > On Wed, 26 Jul 2000, [Windows-1252] Nicolas L=E9onard wrote: >=20 > > I'm trying to use the new kqueue()/kevent() syscalls in the last=20 > > snapshot of FreeBSD 5.0. > > It works perfectly, except when I'm trying to use it in a multi- > > threaded program. > > The call of kevent() by my network thread blocks the other thread. > >=20 > > I look in the libc_r sources and I found that this syscall isn't=20 > > already wrapped. > >=20 > > Does anybody know if there is a patch or another tips to make it=20 > > work ? >=20 > You normally wouldn't mix kqueue and threads; you'd use kqueue to > *implement* threads. :-) Right. This is what we did for poll() -- wrapped it and used it to implement our libc_r threads. We could probably change libc_r's internal use of poll() to kqueue(), but I'm not sure we want to be beating a dead horse when a better threading solution is on the horizon. --=20 Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SUN.3.91.1000727174628.1898A-100000>