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:
@ -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);
|
||||
|
Reference in New Issue
Block a user