| /linux/tools/testing/selftests/bpf/ |
| H A D | bpf_atomic.h | 49 #define try_cmpxchg(p, pold, new) \ macro 58 #define try_cmpxchg_relaxed(p, pold, new) try_cmpxchg(p, pold, new) 60 #define try_cmpxchg_acquire(p, pold, new) try_cmpxchg(p, pold, new)
|
| /linux/lib/ |
| H A D | llist.c | 40 } while (!try_cmpxchg(&head->first, &entry, next)); in llist_del_first() 68 } while (!try_cmpxchg(&head->first, &entry, next)); in llist_del_first_this()
|
| H A D | genalloc.c | 54 } while (!try_cmpxchg(addr, &val, val | mask_to_set)); in set_bits_ll() 68 } while (!try_cmpxchg(addr, &val, val & ~mask_to_clear)); in clear_bits_ll()
|
| /linux/rust/kernel/sync/ |
| H A D | atomic.rs | 442 if self.try_cmpxchg(&mut old, new, o) { in cmpxchg() 458 fn try_cmpxchg<Ordering: ordering::Ordering>(&self, old: &mut T, new: T, _: Ordering) -> bool { in try_cmpxchg() function
|
| /linux/include/linux/ |
| H A D | bitops.h | 366 } while (!try_cmpxchg(ptr, &old__, new__)); \ 383 } while (!try_cmpxchg(ptr, &old__, new__)); \
|
| H A D | pgalloc_tag.h | 157 } while (unlikely(!try_cmpxchg(&page->flags.f, &old_flags, flags))); in update_page_tag_ref()
|
| /linux/mm/ |
| H A D | mmzone.c | 109 } while (unlikely(!try_cmpxchg(&folio->flags.f, &old_flags, flags))); in folio_xchg_last_cpupid()
|
| H A D | swap.c | 410 } while (!try_cmpxchg(&folio->flags.f, &old_flags, new_flags)); in lru_gen_inc_refs()
|
| /linux/mm/kasan/ |
| H A D | tags.c | 123 if (!try_cmpxchg(&entry->ptr, &old_ptr, STACK_RING_BUSY_PTR)) in save_stack_info()
|
| /linux/include/rv/ |
| H A D | da_monitor.h | 119 if (likely(try_cmpxchg(&da_mon->curr_state, &curr_state, next_state))) { \ 159 if (likely(try_cmpxchg(&da_mon->curr_state, &curr_state, next_state))) { \
|
| /linux/scripts/atomic/ |
| H A D | atomics.tbl | 32 try_cmpxchg B v p:old i:new
|
| /linux/Documentation/ |
| H A D | atomic_t.txt | 148 - swap operations: xchg(), cmpxchg() and try_cmpxchg() 282 Both provide the same functionality, but try_cmpxchg() can lead to more 313 NB. try_cmpxchg() also generates better code on some platforms (notably x86)
|
| /linux/rust/kernel/sync/atomic/ |
| H A D | internal.rs | 235 fn try_cmpxchg[acquire, release, relaxed](
|
| /linux/arch/s390/kvm/ |
| H A D | gaccess.c | 136 } while (!try_cmpxchg(&ic->val, &old.val, new.val)); in ipte_lock_simple() 154 } while (!try_cmpxchg(&ic->val, &old.val, new.val)); in ipte_unlock_simple() 175 } while (!try_cmpxchg(&ic->val, &old.val, new.val)); in ipte_lock_siif() 189 } while (!try_cmpxchg(&ic->val, &old.val, new.val)); in ipte_unlock_siif()
|
| H A D | interrupt.c | 201 } while (!try_cmpxchg(&gisa->u64.word[0], &word, _word)); in gisa_set_iam() 222 } while (!try_cmpxchg(&gisa->u64.word[0], &word, _word)); in gisa_clear_ipm() 247 } while (!try_cmpxchg(&gi->origin->u64.word[0], &word, _word)); in gisa_get_ipm_or_restore_iam()
|
| /linux/kernel/locking/ |
| H A D | qspinlock_paravirt.h | 217 if (try_cmpxchg(&he->lock, &old, lock)) { in pv_hash()
|
| /linux/fs/kernfs/ |
| H A D | inode.c | 53 if (!try_cmpxchg(&kn->iattr, &attr, ret)) in __kernfs_iattrs()
|
| /linux/arch/x86/kernel/acpi/ |
| H A D | boot.c | 1797 } while (!try_cmpxchg(lock, &old, new)); in __acpi_acquire_global_lock() 1812 } while (!try_cmpxchg(lock, &old, new)); in __acpi_release_global_lock()
|
| /linux/arch/x86/events/amd/ |
| H A D | uncore.c | 224 if (try_cmpxchg(&ctx->events[i], &tmp, event)) { in amd_uncore_add() 260 if (try_cmpxchg(&ctx->events[i], &tmp, NULL)) in amd_uncore_del()
|
| /linux/kernel/cgroup/ |
| H A D | rstat.c | 121 if (!try_cmpxchg(&rstatc->lnode.next, &self, NULL)) in css_rstat_updated()
|
| /linux/arch/x86/include/asm/ |
| H A D | pgtable.h | 1291 } while (!try_cmpxchg((long *)&ptep->pte, (long *)&old_pte, *(long *)&new_pte)); in ptep_set_wrprotect() 1351 } while (!try_cmpxchg((long *)pmdp, (long *)&old_pmd, *(long *)&new_pmd)); in pmdp_set_wrprotect()
|
| /linux/arch/x86/xen/ |
| H A D | p2m.c | 563 if (try_cmpxchg(top_mfn_p, &missing_mfn, mid_mfn_mfn)) { in xen_alloc_p2m_entry()
|
| /linux/arch/x86/kernel/ |
| H A D | kvm.c | 686 if (try_cmpxchg(&src->preempted, &state, in kvm_flush_tlb_multi()
|
| /linux/fs/ |
| H A D | inode.c | 2841 if (try_cmpxchg(&inode->i_ctime_nsec, &cur, now.tv_nsec)) { in inode_set_ctime_current() 2916 if (try_cmpxchg(&inode->i_ctime_nsec, &cur, update.tv_nsec)) { in inode_set_ctime_deleg()
|
| /linux/drivers/char/ |
| H A D | random.c | 740 } while (!try_cmpxchg(&input_pool.init_bits, &orig, new)); in _credit_init_bits()
|