Home
last modified time | relevance | path

Searched refs:xchg (Results 1 - 25 of 472) sorted by relevance

12345678910>>...19

/kernel/linux/linux-6.6/scripts/atomic/
H A Dgen-atomic-fallback.sh159 local xchg="$1"; shift
163 #define raw_${xchg}_relaxed arch_${xchg}_relaxed
165 #ifdef arch_${xchg}_acquire
166 #define raw_${xchg}_acquire arch_${xchg}_acquire
168 #define raw_${xchg}_acquire(...) \\
169 __atomic_op_acquire(arch_${xchg}, __VA_ARGS__)
172 #ifdef arch_${xchg}_release
173 #define raw_${xchg}_releas
[all...]
H A Dgen-atomic-instrumented.sh87 local xchg="$1"; shift
91 if [ "${xchg%_local}" = "${xchg}" ]; then
98 if [ "${xchg%${xchg#try_cmpxchg}}" = "try_cmpxchg" ] ; then
101 #define ${xchg}${order}(ptr, oldp, ...) \\
110 raw_${xchg}${order}(__ai_ptr, __ai_oldp, __VA_ARGS__); \\
117 #define ${xchg}${order}(ptr, ...) \\
124 raw_${xchg}${order}(__ai_ptr, __VA_ARGS__); \\
165 for xchg i
[all...]
/kernel/linux/linux-5.10/scripts/atomic/
H A Dgen-atomic-fallback.sh149 local xchg="$1"; shift
151 #ifndef ${xchg}_relaxed
152 #define ${xchg}_relaxed ${xchg}
153 #define ${xchg}_acquire ${xchg}
154 #define ${xchg}_release ${xchg}
155 #else /* ${xchg}_relaxed */
157 #ifndef ${xchg}_acquir
[all...]
/kernel/linux/linux-5.10/drivers/accessibility/speakup/
H A Dselection.c39 tty = xchg(&ssw->tty, NULL); in __speakup_set_selection()
99 * we need to use xchg here to avoid race with speakup_set_selection() in speakup_cancel_selection()
101 tty = xchg(&speakup_sel_work.tty, NULL); in speakup_cancel_selection()
110 struct tty_struct *tty = xchg(&ssw->tty, NULL); in __speakup_paste_selection()
138 tty = xchg(&speakup_paste_work.tty, NULL); in speakup_cancel_paste()
/kernel/linux/linux-6.6/drivers/accessibility/speakup/
H A Dselection.c39 tty = xchg(&ssw->tty, NULL); in __speakup_set_selection()
99 * we need to use xchg here to avoid race with speakup_set_selection() in speakup_cancel_selection()
101 tty = xchg(&speakup_sel_work.tty, NULL); in speakup_cancel_selection()
110 struct tty_struct *tty = xchg(&ssw->tty, NULL); in __speakup_paste_selection()
138 tty = xchg(&speakup_paste_work.tty, NULL); in speakup_cancel_paste()
/kernel/linux/linux-5.10/arch/alpha/include/asm/
H A Dcmpxchg.h11 #include <asm/xchg.h>
39 #include <asm/xchg.h>
45 #define xchg(ptr, x) \ macro
/kernel/linux/linux-5.10/arch/x86/include/asm/
H A Dpgtable-2level.h52 return __pte(xchg(&xp->pte_low, 0)); in native_ptep_get_and_clear()
61 return __pmd(xchg((pmdval_t *)xp, 0)); in native_pmdp_get_and_clear()
70 return __pud(xchg((pudval_t *)xp, 0)); in native_pudp_get_and_clear()
H A Dpgtable_64.h94 return native_make_pte(xchg(&xp->pte, 0)); in native_ptep_get_and_clear()
107 return native_make_pmd(xchg(&xp->pmd, 0)); in native_pmdp_get_and_clear()
130 return native_make_pud(xchg(&xp->pud, 0)); in native_pudp_get_and_clear()
H A Dpgtable-3level.h178 /* xchg acts as a barrier before setting of the high bits */ in native_pmdp_get_and_clear()
179 res.pmd_low = xchg(&orig->pmd_low, 0); in native_pmdp_get_and_clear()
208 /* xchg acts as a barrier before setting of the high bits */ in pmdp_establish()
209 old.pmd_low = xchg(&ptr->pmd_low, new.pmd_low); in pmdp_establish()
240 /* xchg acts as a barrier before setting of the high bits */ in native_pudp_get_and_clear()
241 res.pud_low = xchg(&orig->pud_low, 0); in native_pudp_get_and_clear()
/kernel/linux/linux-5.10/arch/arc/include/asm/
H A Dcmpxchg.h82 * 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) \ macro
139 #define xchg(ptr, with) _xchg(ptr, with) macro
144 * "atomic" variant of xchg()
146 * Since xchg() does
[all...]
/kernel/linux/linux-6.6/arch/x86/include/asm/
H A Dpgtable-2level.h52 return __pte(xchg(&xp->pte_low, 0)); in native_ptep_get_and_clear()
61 return __pmd(xchg((pmdval_t *)xp, 0)); in native_pmdp_get_and_clear()
70 return __pud(xchg((pudval_t *)xp, 0)); in native_pudp_get_and_clear()
H A Dpgtable_64.h94 return native_make_pte(xchg(&xp->pte, 0)); in native_ptep_get_and_clear()
107 return native_make_pmd(xchg(&xp->pmd, 0)); in native_pmdp_get_and_clear()
130 return native_make_pud(xchg(&xp->pud, 0)); in native_pudp_get_and_clear()
/kernel/linux/linux-5.10/arch/h8300/include/asm/
H A Dcmpxchg.h7 #define xchg(ptr, x) \ macro
64 #define atomic_xchg(v, new) (xchg(&((v)->counter), new))
/kernel/linux/linux-5.10/kernel/
H A Ddma.c75 if (xchg(&dma_chan_busy[dmanr].lock, 1) != 0) in request_dma()
95 if (xchg(&dma_chan_busy[dmanr].lock, 0) == 0) { in free_dma()
H A Dkexec.c131 kimage_free(xchg(dest_image, NULL)); in do_kexec_load()
141 kimage_free(xchg(&kexec_crash_image, NULL)); in do_kexec_load()
176 image = xchg(dest_image, image); in do_kexec_load()
/kernel/linux/linux-6.6/kernel/
H A Ddma.c75 if (xchg(&dma_chan_busy[dmanr].lock, 1) != 0) in request_dma()
95 if (xchg(&dma_chan_busy[dmanr].lock, 0) == 0) { in free_dma()
H A Dkexec.c112 kimage_free(xchg(dest_image, NULL)); in do_kexec_load()
122 kimage_free(xchg(&kexec_crash_image, NULL)); in do_kexec_load()
162 image = xchg(dest_image, image); in do_kexec_load()
/kernel/linux/linux-5.10/arch/sparc/include/asm/
H A Datomic_64.h56 return xchg(&v->counter, new); in atomic_xchg()
61 #define atomic64_xchg(v, new) (xchg(&((v)->counter), new))
/kernel/linux/linux-6.6/arch/alpha/include/asm/
H A Dcmpxchg.h11 #include <asm/xchg.h>
39 #include <asm/xchg.h>
/kernel/linux/linux-5.10/include/asm-generic/
H A Dcmpxchg.h3 * Generic UP xchg and cmpxchg using interrupt disablement. Does not
17 #ifndef xchg
21 * something tries to do an invalidly-sized xchg().
83 #define xchg(ptr, x) ({ \ macro
88 #endif /* xchg */
/kernel/linux/linux-5.10/arch/um/kernel/
H A Dirq.c544 mask = xchg(&pending_mask, *mask_out); in to_irq_stack()
550 * until xchg returns the same value that we put in. in to_irq_stack()
558 mask = xchg(&pending_mask, old); in to_irq_stack()
577 mask = xchg(&pending_mask, 0); in to_irq_stack()
596 mask = xchg(&pending_mask, 0); in from_irq_stack()
/kernel/linux/linux-5.10/tools/testing/selftests/powerpc/benchmarks/
H A Dcontext_switch.c274 static unsigned long xchg(unsigned long *p, unsigned long val) in xchg() function
293 c = xchg(m, 2); in mutex_lock()
297 c = xchg(m, 2); in mutex_lock()
311 else if (xchg(m, 0) == 1) in mutex_unlock()
/kernel/linux/linux-6.6/tools/testing/selftests/powerpc/benchmarks/
H A Dcontext_switch.c274 static unsigned long xchg(unsigned long *p, unsigned long val) in xchg() function
293 c = xchg(m, 2); in mutex_lock()
297 c = xchg(m, 2); in mutex_lock()
311 else if (xchg(m, 0) == 1) in mutex_unlock()
/kernel/linux/linux-5.10/arch/arm/kernel/
H A Ddma.c62 if (xchg(&dma->lock, 1) != 0) in request_dma()
74 xchg(&dma->lock, 0); in request_dma()
105 if (xchg(&dma->lock, 0) != 0) { in free_dma()
/kernel/linux/linux-6.6/arch/arm/kernel/
H A Ddma.c62 if (xchg(&dma->lock, 1) != 0) in request_dma()
74 xchg(&dma->lock, 0); in request_dma()
105 if (xchg(&dma->lock, 0) != 0) { in free_dma()

Completed in 9 milliseconds

12345678910>>...19