Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Nov 2001 12:11:17 -0800
From:      Peter Wemm <peter@wemm.org>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        freebsd-arch@FreeBSD.ORG
Subject:   Re: Need review - patch for socket locking and ref counting 
Message-ID:  <20011115201117.34216380A@overcee.netplex.com.au>
In-Reply-To: <200111150015.fAF0Flb09186@apollo.backplane.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011115201117.34216380A>