Home
last modified time | relevance | path

Searched refs:try_cmpxchg (Results 1 – 25 of 63) sorted by relevance

123

/linux/kernel/
H A Dtask_work.c73 } 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/tools/testing/selftests/bpf/
H A Dbpf_atomic.h49 #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 Dllist.c40 } 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 Dgenalloc.c54 } 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 Datomic.rs431 if self.try_cmpxchg(&mut old, new, o) { in cmpxchg()
447 fn try_cmpxchg<Ordering: ordering::Ordering>(&self, old: &mut T, new: T, _: Ordering) -> bool { in try_cmpxchg() function
/linux/include/linux/
H A Dbitops.h366 } while (!try_cmpxchg(ptr, &old__, new__)); \
383 } while (!try_cmpxchg(ptr, &old__, new__)); \
H A Dunwind_deferred.h56 } while (!try_cmpxchg(&info->unwind_mask, &bits, 0UL)); in unwind_reset_info()
H A Dllist.h242 } while (!try_cmpxchg(&head->first, &first, new_first)); in llist_add_batch()
H A Dpgalloc_tag.h157 } while (unlikely(!try_cmpxchg(&page->flags.f, &old_flags, flags))); in update_page_tag_ref()
/linux/mm/
H A Dmmzone.c109 } while (unlikely(!try_cmpxchg(&folio->flags.f, &old_flags, flags))); in folio_xchg_last_cpupid()
/linux/mm/kasan/
H A Dtags.c123 if (!try_cmpxchg(&entry->ptr, &old_ptr, STACK_RING_BUSY_PTR)) in save_stack_info()
/linux/include/rv/
H A Dda_monitor.h134 if (likely(try_cmpxchg(&da_mon->curr_state, &curr_state, next_state))) { \
174 if (likely(try_cmpxchg(&da_mon->curr_state, &curr_state, next_state))) { \
/linux/scripts/atomic/
H A Datomics.tbl32 try_cmpxchg B v p:old i:new
/linux/Documentation/
H A Datomic_t.txt148 - 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 Dinternal.rs235 fn try_cmpxchg[acquire, release, relaxed](
/linux/kernel/unwind/
H A Ddeferred.c28 return try_cmpxchg(&info->id.cnt, &old, cnt); in try_assign_cnt()
/linux/drivers/gpu/drm/i915/gt/
H A Dintel_gt_requests.c107 while (!try_cmpxchg(&engine->retire, &first, tl)); in add_retire()
/linux/arch/s390/kvm/
H A Dgaccess.c143 } while (!try_cmpxchg(&ic->val, &old.val, new.val)); in ipte_lock_simple()
163 } while (!try_cmpxchg(&ic->val, &old.val, new.val)); in ipte_unlock_simple()
187 } while (!try_cmpxchg(&ic->val, &old.val, new.val)); in ipte_lock_siif()
203 } while (!try_cmpxchg(&ic->val, &old.val, new.val)); in ipte_unlock_siif()
/linux/kernel/locking/
H A Dqspinlock_paravirt.h217 if (try_cmpxchg(&he->lock, &old, lock)) { in pv_hash()
/linux/fs/gfs2/
H A Dutil.c328 } while (unlikely(!try_cmpxchg(&sdp->sd_flags, &old, new))); in gfs2_withdraw()
/linux/arch/x86/kernel/acpi/
H A Dboot.c1797 } while (!try_cmpxchg(lock, &old, new)); in __acpi_acquire_global_lock()
1812 } while (!try_cmpxchg(lock, &old, new)); in __acpi_release_global_lock()
/linux/fs/kernfs/
H A Dinode.c53 if (!try_cmpxchg(&kn->iattr, &attr, ret)) in __kernfs_iattrs()
/linux/arch/x86/events/amd/
H A Duncore.c224 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/arch/x86/include/asm/
H A Dpgtable.h1291 } 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/mm/pat/
H A Dmemtype.c167 } while (!try_cmpxchg(&pg->flags.f, &old_flags, new_flags)); in set_page_memtype()

123