xref: /openbmc/linux/scripts/atomic/fallbacks/xchg (revision 9257959a6e5b4fca6fc8e985790bff62c2046f20)
1d12157efSMark Rutlandcat <<EOF
2d12157efSMark Rutlandstatic __always_inline ${int}
3*9257959aSMark Rutlandraw_${atomic}_xchg${order}(${atomic}_t *v, ${int} new)
4d12157efSMark Rutland{
5*9257959aSMark Rutland	return raw_xchg${order}(&v->counter, new);
6d12157efSMark Rutland}
7d12157efSMark RutlandEOF
8