This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
FWIW, I saw hangs with this too, both ppc and ppc64. It's got something to do with that last hunk which replaced the atomic_increment call with an asm which appears to impmlement an atomic_read_barrier + atomic_increment.This fixes some bugs in the powerpc pthread_once code. Ref gcc.gnu.org/bugzilla/show_bug.cgi?id=52839#c10
Release barriers are needed to ensure any memory written by init_routine is seen by other threads before *once_control changes. In the case of clear_once_control we need to flush any partially written state.
2012-06-28 Alan Modra <amodra@gmail.com>
* sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once): Add release barrier before setting once_control to say initialisation is done. Add hints on lwarx. Use macro in place of isync. (clear_once_control): Add release barrier.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |