linux-zen-desktop/scripts/atomic/fallbacks/read_acquire

13 lines
190 B
Plaintext
Raw Normal View History

2023-08-30 17:31:07 +02:00
cat <<EOF
${int} ret;
if (__native_word(${atomic}_t)) {
ret = smp_load_acquire(&(v)->counter);
} else {
2023-10-24 12:59:35 +02:00
ret = raw_${atomic}_read(v);
2023-08-30 17:31:07 +02:00
__atomic_acquire_fence();
}
return ret;
EOF