xref: /linux/scripts/atomic/fallbacks/set_release (revision dc1b4df09acdca7a89806b28f235cd6d8dcd3d24)
1ace9bad4SMark Rutlandcat <<EOF
2765dcd20SMarco Elverstatic __always_inline void
3f3e615b4SMark Rutlandarch_${atomic}_set_release(${atomic}_t *v, ${int} i)
4ace9bad4SMark Rutland{
5*dc1b4df0SMark Rutland	if (__native_word(${atomic}_t)) {
6ace9bad4SMark Rutland		smp_store_release(&(v)->counter, i);
7*dc1b4df0SMark Rutland	} else {
8*dc1b4df0SMark Rutland		__atomic_release_fence();
9*dc1b4df0SMark Rutland		arch_${atomic}_set(v, i);
10*dc1b4df0SMark Rutland	}
11ace9bad4SMark Rutland}
12ace9bad4SMark RutlandEOF
13