| /linux-6.15/lib/ |
| H A D | llist.c | 33 } while (!try_cmpxchg(&head->first, &first, new_first)); in llist_add_batch() 62 } while (!try_cmpxchg(&head->first, &entry, next)); in llist_del_first() 90 } 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-6.15/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-6.15/kernel/ |
| H A D | task_work.c | 73 } while (!try_cmpxchg(&task->task_works, &head, work)); in task_work_add() 132 } else if (try_cmpxchg(pprev, &work, work->next)) in task_work_cancel_match() 213 } while (!try_cmpxchg(&task->task_works, &work, head)); in task_work_run()
|
| /linux-6.15/include/linux/ |
| H A D | bitops.h | 367 } while (!try_cmpxchg(ptr, &old__, new__)); \ 384 } while (!try_cmpxchg(ptr, &old__, new__)); \
|
| H A D | pgalloc_tag.h | 156 } while (unlikely(!try_cmpxchg(&page->flags, &old_flags, flags))); in update_page_tag_ref()
|
| /linux-6.15/mm/ |
| H A D | mmzone.c | 109 } while (unlikely(!try_cmpxchg(&folio->flags, &old_flags, flags))); in folio_xchg_last_cpupid()
|
| H A D | swap.c | 404 } while (!try_cmpxchg(&folio->flags, &old_flags, new_flags)); in lru_gen_inc_refs()
|
| /linux-6.15/mm/kasan/ |
| H A D | tags.c | 123 if (!try_cmpxchg(&entry->ptr, &old_ptr, STACK_RING_BUSY_PTR)) in save_stack_info()
|
| /linux-6.15/scripts/atomic/ |
| H A D | atomics.tbl | 32 try_cmpxchg B v p:old i:new
|
| /linux-6.15/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-6.15/drivers/gpu/drm/i915/gt/ |
| H A D | intel_gt_requests.c | 107 while (!try_cmpxchg(&engine->retire, &first, tl)); in add_retire()
|
| /linux-6.15/arch/s390/kvm/ |
| H A D | gaccess.c | 142 } while (!try_cmpxchg(&ic->val, &old.val, new.val)); in ipte_lock_simple() 162 } while (!try_cmpxchg(&ic->val, &old.val, new.val)); in ipte_unlock_simple() 186 } while (!try_cmpxchg(&ic->val, &old.val, new.val)); in ipte_lock_siif() 202 } while (!try_cmpxchg(&ic->val, &old.val, new.val)); in ipte_unlock_siif()
|
| /linux-6.15/kernel/locking/ |
| H A D | qspinlock_paravirt.h | 217 if (try_cmpxchg(&he->lock, &old, lock)) { in pv_hash()
|
| /linux-6.15/fs/gfs2/ |
| H A D | util.c | 337 } while (unlikely(!try_cmpxchg(&sdp->sd_flags, &old, new))); in gfs2_withdraw()
|
| /linux-6.15/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-6.15/arch/x86/events/amd/ |
| H A D | uncore.c | 167 if (try_cmpxchg(&ctx->events[i], &tmp, event)) { in amd_uncore_add() 203 if (try_cmpxchg(&ctx->events[i], &tmp, NULL)) in amd_uncore_del()
|
| /linux-6.15/arch/x86/include/asm/ |
| H A D | pgtable.h | 1358 } while (!try_cmpxchg((long *)&ptep->pte, (long *)&old_pte, *(long *)&new_pte)); in ptep_set_wrprotect() 1420 } while (!try_cmpxchg((long *)pmdp, (long *)&old_pmd, *(long *)&new_pmd)); in pmdp_set_wrprotect()
|
| /linux-6.15/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-6.15/arch/x86/kernel/ |
| H A D | kvm.c | 672 if (try_cmpxchg(&src->preempted, &state, in kvm_flush_tlb_multi()
|
| /linux-6.15/arch/x86/mm/pat/ |
| H A D | memtype.c | 167 } while (!try_cmpxchg(&pg->flags, &old_flags, new_flags)); in set_page_memtype()
|
| /linux-6.15/fs/bcachefs/ |
| H A D | btree_cache.c | 725 if (try_cmpxchg(&bc->alloc_lock, &old, current) || old == current) in bch2_btree_cache_cannibalize_lock() 737 if (try_cmpxchg(&bc->alloc_lock, &old, current) || old == current) { in bch2_btree_cache_cannibalize_lock()
|
| /linux-6.15/kernel/sched/ |
| H A D | core.c | 947 } while (!try_cmpxchg(_ptr, &_val, _val | _mask)); \ 978 } while (!try_cmpxchg(&ti->flags, &val, val | _TIF_NEED_RESCHED)); in set_nr_if_polling() 10366 if (!try_cmpxchg(&src_pcpu_cid->cid, &src_cid, lazy_cid)) in __sched_mm_cid_migrate_from_try_steal_cid() 10402 if (!try_cmpxchg(&src_pcpu_cid->cid, &lazy_cid, MM_CID_UNSET)) in __sched_mm_cid_migrate_from_try_steal_cid() 10486 if (!try_cmpxchg(&pcpu_cid->cid, &cid, lazy_cid)) in sched_mm_cid_remote_clear() 10519 if (try_cmpxchg(&pcpu_cid->cid, &lazy_cid, MM_CID_UNSET)) in sched_mm_cid_remote_clear() 10598 if (!try_cmpxchg(&mm->mm_cid_next_scan, &old_scan, next_scan)) in task_mm_cid_work()
|
| /linux-6.15/block/ |
| H A D | blk-core.c | 1020 likely(try_cmpxchg(&part->bd_stamp, &stamp, now)) && in update_io_ticks()
|
| /linux-6.15/fs/ |
| H A D | posix_acl.c | 177 if (unlikely(!try_cmpxchg(p, &sentinel, acl))) in __get_acl()
|