[PATCHv3] PowerPC: Fix a race condition when eliding a lock
Carlos O'Donell
carlos@redhat.com
Mon Aug 24 18:58:00 GMT 2015
On 08/24/2015 02:11 PM, Tulio Magno Quites Machado Filho wrote:
> Changes since v2:
> - Moved part of the source code comments to the commit message.
> - Added O'Donnel's suggestion to the source code comments.
>
> Changes since v1:
> - Improved commit message.
> - Added new comments in the source code alerting to the concurrency details
> intrinsic to this code.
> - Removed compiler barriers from this patch, which will be treated in another
> patch and will be synchronized with the GCC implementation.
> + if (__builtin_tbegin (0)) \
> + { \
> + if (is_lock_free) \
> + { \
> + ret = 1; \
> + break; \
> + } \
> + __builtin_tabort (_ABORT_LOCK_BUSY); \
> + } \
> + else \
> + if (!__get_new_count(&adapt_count)) \
> + break; \
Toravld still suggests an atomic_load_relaxed here:
https://www.sourceware.org/ml/libc-alpha/2015-08/msg00893.html
Is there any technical objection to that request?
It does highlight, as he notes, the transactional and non-transactional
accesses for that evaluated value.
Cheers,
Carlos.
More information about the Libc-alpha
mailing list