From owner-freebsd-net@FreeBSD.ORG Thu Sep 23 18:13:26 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B321616A4CE for ; Thu, 23 Sep 2004 18:13:26 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 92C6B43D2D for ; Thu, 23 Sep 2004 18:13:26 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id i8NIG5cL024218; Thu, 23 Sep 2004 11:16:05 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id i8NIG5Wg024217; Thu, 23 Sep 2004 11:16:05 -0700 Date: Thu, 23 Sep 2004 11:16:05 -0700 From: Brooks Davis To: Waldemar Kornewald Message-ID: <20040923181605.GC25699@odin.ac.hmc.edu> References: <4152A3E9.8080700@web.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1SQmhf2mF2YjsYvc" Content-Disposition: inline In-Reply-To: <4152A3E9.8080700@web.de> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu cc: FreeBSD-net Subject: Re: locking X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2004 18:13:26 -0000 --1SQmhf2mF2YjsYvc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 23, 2004 at 12:22:33PM +0200, Waldemar Kornewald wrote: > Hi again, > we at the Haiku networking team are considering a port of your 5.3=20 > netstack because it is thread-safe and making the old one (4.x, I think)= =20 > thread-safe is probably a much bigger task. It depends on the model you want. You may also wish to consider the direction DragonFly BSD is taking. It's interesting if unproven. I don't really know enough about Haiku OS to comment more. > Now, I saw that the routing code seems to use macros for the locking=20 > code. Do you use macros everywhere? We usually use macros for locking. It allows us to hid the details of the calls since they aren't very informative. In other cases like ifnet we use macros as though we were using reader-writer locks, but in fact we currently use mutexes since sx locks are more expensive. > We would prefer having native threads and locks. Haiku only has=20 > semaphores, not mutexes, is that a problem? You can implement mutexes using semaphores, but semaphores tend to be a more expensive since they are more expressive them mutexes. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --1SQmhf2mF2YjsYvc Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBUxLlXY6L6fI4GtQRAolCAJ9FY208hGaqQeMht/RdkrIYRM7ORwCgw5ad 5gK506YjXGs8BY/nI+BM+SI= =w5gO -----END PGP SIGNATURE----- --1SQmhf2mF2YjsYvc--