[OT] ppc64 serialization problem
Greg Smith
gsmith at nc.rr.com
Wed Mar 29 12:58:26 EST 2006
We have a multi-threaded app running on a p520 in 64 bit mode.
Thread A does
pthread_mutex_lock(&lock);
u32 &= ~bitA;
pthread_mutex_unlock(&lock);
and Thread B does
pthread_mutex_lock(&lock);
u32 |= bitB;
A = u32;
B = u32;
pthread_mutex_unlock(&lock);
On rare occasions, values A and B will differ! In the examples that I
have seen, there is contention with `lock'. This phenomenon does not
occur on ppc32 or a number of other architectures that we support.
I confess I do not know the linux version nor the glibc version nor what
pthreads implementation is being used. I'll find that out shortly.
What I am curious about is where the problem might lie
(kernel/lib/pthreads/app) so I can ask the right people.
Thank you for your patience,
Greg Smith
More information about the Linuxppc-dev
mailing list