1 cat <<EOF 1 cat <<EOF 2 ${int} ret; 2 ${int} ret; 3 3 4 if (__native_word(${atomic}_t)) { 4 if (__native_word(${atomic}_t)) { 5 ret = smp_load_acquire(&(v)->c 5 ret = smp_load_acquire(&(v)->counter); 6 } else { 6 } else { 7 ret = raw_${atomic}_read(v); 7 ret = raw_${atomic}_read(v); 8 __atomic_acquire_fence(); 8 __atomic_acquire_fence(); 9 } 9 } 10 10 11 return ret; 11 return ret; 12 EOF 12 EOF
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.