From owner-freebsd-hackers Fri Jul 28 13:24:23 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mta4.rcsntx.swbell.net (mta4.rcsntx.swbell.net [151.164.30.28]) by hub.freebsd.org (Postfix) with ESMTP id E784A37BC74 for ; Fri, 28 Jul 2000 13:24:17 -0700 (PDT) (envelope-from chris@holly.calldei.com) Received: from holly.calldei.com ([208.191.149.190]) by mta4.rcsntx.swbell.net (Sun Internet Mail Server sims.3.5.2000.01.05.12.18.p9) with ESMTP id <0FYF00JN0BY3U0@mta4.rcsntx.swbell.net> for hackers@FreeBSD.ORG; Fri, 28 Jul 2000 15:08:28 -0500 (CDT) Received: (from chris@localhost) by holly.calldei.com (8.9.3/8.9.3) id PAA42531; Fri, 28 Jul 2000 15:05:53 -0500 (CDT envelope-from chris) Date: Fri, 28 Jul 2000 15:05:53 -0500 From: Chris Costello Subject: Re: kevent()/kqueue() in a multithreaded environment In-reply-to: <200007281945.MAA26198@bubba.whistle.com> To: Archie Cobbs Cc: Doug White , hackers@FreeBSD.ORG Reply-To: chris@calldei.com Message-id: <20000728150552.N37935@holly.calldei.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii User-Agent: Mutt/0.96.4i References: <200007281945.MAA26198@bubba.whistle.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Friday, July 28, 2000, Archie Cobbs wrote: > Doug White writes: > > AFAIK kqueue hasn't been made threadsafe, you'll have to bug > > jlemon@freebsd.org about it. Patches gladly accepted :) > > I may be just being stupid but I don't understand that last sentence. > > I thought kqueue() and kevent() were system calls... how can they > not be thread safe? Consider a kqueue() with a timeout--the calling process does not get woken up until the timeout is completed. Look at src/lib/libc_r/uthread/uthread_poll.c for something similar to how a threaded kevent() could be implemented. I don't think kqueue() would block. -- |Chris Costello |If a group of N persons implements a COBOL compiler, there will be N-1 |passes. Someone in the group has to be the manager. -- T. Cheatham `---------------------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message