|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH] atomic_read
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).
--- xen/include/xen/sched.h.old Thu Mar 10 16:01:14 2005
+++ xen/include/xen/sched.h Thu Mar 10 16:01:17 2005
@@ -194,12 +194,12 @@ static always_inline int get_domain(stru
do
{
old = seen;
- if ( unlikely(_atomic_read(old) & DOMAIN_DESTRUCTED) )
+ if ( unlikely(atomic_read(old) & DOMAIN_DESTRUCTED) )
return 0;
- _atomic_set(new, _atomic_read(old) + 1);
+ atomic_set(new, atomic_read(old) + 1);
seen = atomic_compareandswap(old, new, &d->refcnt);
}
- while ( unlikely(_atomic_read(seen) != _atomic_read(old)) );
+ while ( unlikely(atomic_read(seen) != atomic_read(old)) );
return 1;
}
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
--
Hollis Blanchard
IBM Linux Technology Center
-------------------------------------------------------
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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH] atomic_read,
Hollis Blanchard <=
|
|
|
|
|