From: Keir Fraser Subject: Re: [PATCH] atomic_read Date: Fri, 11 Mar 2005 15:53:53 +0000 Message-ID: <6f5ce80fdc1847878df7bcd58558d7b6@cl.cam.ac.uk> References: 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 14:57, Hollis Blanchard wrote: > Hi, I noticed that include/xen/sched.h uses _atomic_*() in a couple > places, while all other Xen code uses atomic_*(). In general I think > functions prefixed with an underscore are not part of the public > interface... > > This patch should be safe since atomic_*() just use volatile and > _atomic_*() do not. > > Side note: the Xen copy of atomic.h appears to be a little out of date > with respect to the Linux 2.6.11 version, in which _atomic_*() is no > longer present (only atomic_*() are). The xen _atomic_* functions aren't like the old Linux ones -- they don't take a pointer to the atomic_t. We use this in the scheduler to produce better-quality code. The patch you sent won't compile because e.g., atomic_set and _atomic_set take different type parameters. -- 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