Lines Matching defs:xchg
82 * xchg (reg with memory) based on "Native atomic" EX insn
110 * xchg() maps directly to ARC EX instruction which guarantees atomicity.
114 * of kernel code which calls xchg()/cmpxchg() on same data (see llist.h)
115 * Hence xchg() needs to follow same locking rules.
119 * be disabled thus can't possibly be interrpted/preempted/clobbered by xchg()
120 * Other way around, xchg is one instruction anyways, so can't be interrupted
126 #define xchg(ptr, with) \
139 #define xchg(ptr, with) _xchg(ptr, with)
144 * "atomic" variant of xchg()
146 * Since xchg() doesn't always do that, it would seem that following defintion
148 * SMP : Even xchg() takes the atomic_ops_lock, so OK.
156 #define atomic_xchg(v, new) (xchg(&((v)->counter), new))