From owner-freebsd-arch Thu Nov 15 12:11:40 2001 Delivered-To: freebsd-arch@freebsd.org Received: from peter3.wemm.org (c1315225-a.plstn1.sfba.home.com [24.14.150.180]) by hub.freebsd.org (Postfix) with ESMTP id 6748037B419 for ; Thu, 15 Nov 2001 12:11:17 -0800 (PST) Received: from overcee.netplex.com.au (overcee.wemm.org [10.0.0.3]) by peter3.wemm.org (8.11.0/8.11.0) with ESMTP id fAFKBHM24661 for ; Thu, 15 Nov 2001 12:11:17 -0800 (PST) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id 34216380A; Thu, 15 Nov 2001 12:11:17 -0800 (PST) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Matthew Dillon Cc: freebsd-arch@FreeBSD.ORG Subject: Re: Need review - patch for socket locking and ref counting In-Reply-To: <200111150015.fAF0Flb09186@apollo.backplane.com> Date: Thu, 15 Nov 2001 12:11:17 -0800 From: Peter Wemm Message-Id: <20011115201117.34216380A@overcee.netplex.com.au> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Matthew Dillon wrote: > +static __inline > +struct mtx * > +_mtx_pool1_find(void *ptr) > +{ > + return(&mtx_pool_ary[(((int)ptr ^ ((int)ptr >> 6)) & MTX_POOL_XMASK) | 0 ]); > +} At the very least, this is not going to compile very well on 64 bit machines. You cannot cast a pointer to an int. At needs to be uintptr_t at minimum. Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message