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