xref: /linux/scripts/atomic/fallbacks/read_acquire (revision cdd5b5a9761fd66d17586e4f4ba6588c70e640ea)
1cat <<EOF
2	${int} ret;
3
4	if (__native_word(${atomic}_t)) {
5		ret = smp_load_acquire(&(v)->counter);
6	} else {
7		ret = raw_${atomic}_read(v);
8		__atomic_acquire_fence();
9	}
10
11	return ret;
12EOF
13