is it a bug of /glibc/sysdeps/arm/atomicity.h ?
Carlos O'Donell
carlos@baldric.uwo.ca
Mon Feb 17 16:05:00 GMT 2003
> > let us consider the following scenario. Suppose there are three thread
> > pathes.
> > Init: *p = 0
> > T1 compare_and_swap(p, 0, 1) ;
> > T2 compare_and_swap(p,0,1);
> > T3 compare_and_swap(p,1,2);
>
> Yes, that function is not actually atomic. If you search the mailing
> list archives for gcc@gcc.gnu.org you'll find several possible fixes;
> no one's done any of them.
Can you get away with a light-weight syscall?
c.
More information about the Libc-alpha
mailing list