read_acquire (762f99f4f3cb41a775b5157dd761217beba65873) | read_acquire (dc1b4df09acdca7a89806b28f235cd6d8dcd3d24) |
---|---|
1cat <<EOF 2static __always_inline ${ret} 3arch_${atomic}_read_acquire(const ${atomic}_t *v) 4{ | 1cat <<EOF 2static __always_inline ${ret} 3arch_${atomic}_read_acquire(const ${atomic}_t *v) 4{ |
5 return smp_load_acquire(&(v)->counter); | 5 ${int} ret; 6 7 if (__native_word(${atomic}_t)) { 8 ret = smp_load_acquire(&(v)->counter); 9 } else { 10 ret = arch_${atomic}_read(v); 11 __atomic_acquire_fence(); 12 } 13 14 return ret; |
6} 7EOF | 15} 16EOF |