From: Keir Fraser Subject: Re: [PATCH] atomic_read Date: Fri, 11 Mar 2005 17:17:55 +0000 Message-ID: References: <6f5ce80fdc1847878df7bcd58558d7b6@cl.cam.ac.uk> Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit In-Reply-To: Sender: xen-devel-admin@lists.sourceforge.net Errors-To: xen-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Hollis Blanchard Cc: xen-devel@lists.sourceforge.net List-Id: xen-devel@lists.xenproject.org On 11 Mar 2005, at 16:52, Hollis Blanchard wrote: > Ahh... I assumed asm-x86/atomic.h was simply out of date, but I see > now that you've modified it yourself. So _atomic_* should now be > considered part of the arch->common interface? Further, it should > actually *not* be an atomic access at all? Of course it will be faster > ("better-quality") code if it's not assumed to be an atomic access... > in which case isn't the naming a little misleading? > > I noticed this problem because linux/include/asm-ppc64/atomic.h > doesn't have _atomic_* functions. I guess this means I will need to > implement my own non-atomic _atomic_* functions? We only define single-word get/set macros (_atomic_read/_atomic_set). These are trivially atomic on any architecture we care about. In fact we only use them to set up local variables prior to pushing out to a shared atomic variable, so the atomicity doesn't really matter to us; it's a bonus. -- Keir ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click