This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
arm, hppa, m68k, sh, nios maintainers: Please check your emulation of atomic operations
- From: Torvald Riegel <triegel at redhat dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>, "Carlos O'Donell" <carlos at redhat dot com>, Andreas Schwab <schwab at suse dot de>, Chung-Lin Tang <chunglin_tang at mentor dot com>
- Cc: GLIBC Devel <libc-alpha at sourceware dot org>
- Date: Thu, 10 Nov 2016 21:13:35 -0800
- Subject: arm, hppa, m68k, sh, nios maintainers: Please check your emulation of atomic operations
- Authentication-results: sourceware.org; auth=none
These architectures seem to all use various sorts of emulation for
compare-and-exchange operations (CAS). If these emulations do not stop
the world during a CAS, or do something else that prevents concurrent
write operations to the same memory location as the CAS, then atomic
store operations in glibc need to use a CAS to perform stores.
Otherwise, concurrent stores can happen between the load(s) and the
store that the CAS consists of.
If your architecture is affected by this, then it may be possible that
glibc's current concurrent code does not work correctly; this is because
we may still have plain stores in places where atomic stores should be
used. Once we have completed the conversion to C11 atomics, all
concurrent stores will go through atomic_store_*().
See Chris Metcalf's patch for tilepro:
https://sourceware.org/ml/libc-alpha/2016-11/msg00414.html
If your architecture is not affected, I suggest adding a comment why
that is not the case.
- Follow-Ups:
- Re: arm, hppa, m68k, sh, nios maintainers: Please check your emulation of atomic operations
- Re: arm, hppa, m68k, sh, nios maintainers: Please check your emulation of atomic operations
- From: Ramana Radhakrishnan
- Re: arm, hppa, m68k, sh, nios maintainers: Please check your emulation of atomic operations