Answer by Notlikethat for Compare and Exchange on Android (ARM)
Does the strexeq clear the monitor set in the ldrex even if the condition is not equal?No. Nor does it need to - this is the "cmp" part of the cmpxchg - if the value loaded isn't the expected one, then...
View ArticleCompare and Exchange on Android (ARM)
The code below is the ARM implementation of compare and exchange on android:__ATOMIC_INLINE__ int __bionic_cmpxchg(int32_t old_value, int32_t new_value, volatile int32_t* ptr) { int32_t prev, status;...
View Article
More Pages to Explore .....