From owner-cvs-all@FreeBSD.ORG Wed Jul 20 14:59:33 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ED40016A41F; Wed, 20 Jul 2005 14:59:33 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 33AE743D5F; Wed, 20 Jul 2005 14:59:32 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.40.201] (Not Verified[65.202.103.25]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Wed, 20 Jul 2005 11:13:42 -0400 From: John Baldwin To: Jeff Roberson Date: Wed, 20 Jul 2005 10:37:40 -0400 User-Agent: KMail/1.8 References: <200507151817.j6FIHx9A019286@repoman.freebsd.org> <20050719192959.C592@10.0.0.1> In-Reply-To: <20050719192959.C592@10.0.0.1> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200507201037.41597.jhb@FreeBSD.org> Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/alpha/include atomic.h src/sys/amd64/include atomic.h src/sys/arm/include atomic.h src/sys/dev/hatm if_hatm_intr.c src/sys/dev/hwpmc hwpmc_mod.c src/sys/i386/include atomic.h src/sys/ia64/include atomic.h src/sys/kern kern_mutex.c ... X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2005 14:59:34 -0000 On Tuesday 19 July 2005 10:30 pm, Jeff Roberson wrote: > On Fri, 15 Jul 2005, John Baldwin wrote: > > jhb 2005-07-15 18:17:59 UTC > > > > FreeBSD src repository > > > > Modified files: > > sys/alpha/include atomic.h > > sys/amd64/include atomic.h > > sys/arm/include atomic.h > > sys/dev/hatm if_hatm_intr.c > > sys/dev/hwpmc hwpmc_mod.c > > sys/i386/include atomic.h > > sys/ia64/include atomic.h > > sys/kern kern_mutex.c > > sys/powerpc/include atomic.h > > sys/sparc64/include atomic.h > > sys/sys mutex.h > > Log: > > Convert the atomic_ptr() operations over to operating on uintptr_t > > variables rather than void * variables. This makes it easier and > > simpler to get asm constraints and volatile keywords correct. > > This breaks ULE as I use atomic cmpsets while passing in actual pointers. > Do I have to cast everywhere now? This kind of breaks the notion of it > operating on a pointer. Could we at least have an inline or define that > does the type conversion? You have to use casts. I fixed the other places, but missed ULE cause it wasn't in GENERIC or LINT. :( The reason I went with uintptr_t is that volatile void ** != volatile uintptr_t *, and some archs (e.g. sparc64) tend to assume they can do 'volatile type *' when defining atomic operations in various macros. It is also less confusing for gcc in asm constraints. Do you recall the bug a while back on sparc64 with mbuf reference counts being wrong because the compiler didn't think that the memory being modified was changed by atomic operations? This is all part of fixing that. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org