diff options
author | Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com> | 2015-12-28 12:24:43 -0200 |
---|---|---|
committer | Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com> | 2016-01-08 17:47:33 -0200 |
commit | 42bf1c897170ff951c7fd0ee9da25f97ff787396 (patch) | |
tree | 3e69cd2d5201944482407b86b4854fe75ab34f12 /sysdeps/unix/sysv/linux/powerpc/elision-lock.c | |
parent | bc49a7afd38c1bd00f0ad9fd6592a5959d5ba72e (diff) | |
download | glibc-42bf1c897170ff951c7fd0ee9da25f97ff787396.tar.gz glibc-42bf1c897170ff951c7fd0ee9da25f97ff787396.tar.xz glibc-42bf1c897170ff951c7fd0ee9da25f97ff787396.zip |
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.
Diffstat (limited to 'sysdeps/unix/sysv/linux/powerpc/elision-lock.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/elision-lock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/elision-lock.c b/sysdeps/unix/sysv/linux/powerpc/elision-lock.c index 830d2ccfe1..dd1e4c3b17 100644 --- a/sysdeps/unix/sysv/linux/powerpc/elision-lock.c +++ b/sysdeps/unix/sysv/linux/powerpc/elision-lock.c @@ -52,12 +52,12 @@ __lll_lock_elision (int *lock, short *adapt_count, EXTRAARG int pshared) for (int i = aconf.try_tbegin; i > 0; i--) { - if (__builtin_tbegin (0)) + if (__libc_tbegin (0)) { if (*lock == 0) return 0; /* Lock was busy. Fall back to normal locking. */ - __builtin_tabort (_ABORT_LOCK_BUSY); + __libc_tabort (_ABORT_LOCK_BUSY); } else { |