From owner-freebsd-net Sat May 18 6: 4:59 2002 Delivered-To: freebsd-net@freebsd.org Received: from mail.speakeasy.net (mail17.speakeasy.net [216.254.0.217]) by hub.freebsd.org (Postfix) with ESMTP id E6FD637B409 for ; Sat, 18 May 2002 06:03:54 -0700 (PDT) Received: (qmail 23408 invoked from network); 18 May 2002 13:03:54 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail17.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 18 May 2002 13:03:54 -0000 Received: from laptop.baldwin.cx (laptop.baldwin.cx [192.168.0.4]) by server.baldwin.cx (8.11.6/8.11.6) with ESMTP id g4ID3qF82151; Sat, 18 May 2002 09:03:52 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <3CE61A25.61C789FA@mindspring.com> Date: Sat, 18 May 2002 09:03:40 -0400 (EDT) From: John Baldwin To: Terry Lambert Subject: Re: new zero copy sockets patches available Cc: net@FreeBSD.org, current@FreeBSD.org, "Kenneth D. Merry" , Alfred Perlstein Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On 18-May-2002 Terry Lambert wrote: > Alfred Perlstein wrote: >> * Kenneth D. Merry [020517 23:31] wrote: >> > The problem here is that the mutex needs to be initialized before I can >> > acquire it, and there's going to be a race between checking to see >> > whether it has been initialized and actually initializing it. >> > >> ... >> > Suggestions? >> >> *slaps forhead* >> >> Probably a SYSINIT? > > God, it's annoying that a statically declared mutex is not > defacto initialized. Is it in solaris? > Yeah, I understand the "witness" crap (if it's there); that > doesn't make it any less annoying. > > Actually, a linker set (not a SYSINIT) could fix that... you > would still need one sysinit to do the linkage of the statically > declared structures, but it's at least doable. a SYSINIT just is a linker set, and there is a convenience SYSINIT MTX_SYSINIT() or what not that just registers a sysinit to initialize a mutex. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message