From owner-freebsd-hackers Thu Jul 27 14: 8:57 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from resnet.uoregon.edu (resnet.uoregon.edu [128.223.122.47]) by hub.freebsd.org (Postfix) with ESMTP id 7797537C116 for ; Thu, 27 Jul 2000 14:08:46 -0700 (PDT) (envelope-from dwhite@resnet.uoregon.edu) Received: from localhost (dwhite@localhost) by resnet.uoregon.edu (8.10.1/8.10.1) with ESMTP id e6RL8hS69786; Thu, 27 Jul 2000 14:08:43 -0700 (PDT) Date: Thu, 27 Jul 2000 14:08:43 -0700 (PDT) From: Doug White To: =?Windows-1252?Q?Nicolas_L=E9onard?= Cc: hackers@FreeBSD.ORG Subject: Re: kevent()/kqueue() in a multithreaded environment In-Reply-To: <011b01bff6d4$778dbae0$0f0210ac@masa.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: 8BIT Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 26 Jul 2000, [Windows-1252] Nicolas Léonard wrote: > I'm trying to use the new kqueue()/kevent() syscalls in the last > 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. > > I look in the libc_r sources and I found that this syscall isn't > already wrapped. > > Does anybody know if there is a patch or another tips to make it > work ? You normally wouldn't mix kqueue and threads; you'd use kqueue to *implement* threads. :-) AFAIK kqueue hasn't been made threadsafe, you'll have to bug jlemon@freebsd.org about it. Patches gladly accepted :) Doug White | FreeBSD: The Power to Serve dwhite@resnet.uoregon.edu | www.FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message