1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-01 10:06:57 +03:00

powerpc: Enforce compiler barriers on hardware transactions

Work around a GCC behavior with hardware transactional memory built-ins.
GCC doesn't treat the PowerPC transactional built-ins as compiler
barriers, moving instructions past the transaction boundaries and
altering their atomicity.
This commit is contained in:
Tulio Magno Quites Machado Filho
2015-12-28 12:24:43 -02:00
parent bc49a7afd3
commit 42bf1c8971
7 changed files with 58 additions and 15 deletions

View File

@ -25,7 +25,7 @@ __lll_unlock_elision (int *lock, short *adapt_count, int pshared)
{
/* When the lock was free we're in a transaction. */
if (*lock == 0)
__builtin_tend (0);
__libc_tend (0);
else
{
lll_unlock ((*lock), pshared);