Home
last modified time | relevance | path

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

12

/linux/tools/testing/selftests/bpf/
H A Dbpf_atomic.h
/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.rs437 // try_cmpxchg() is used to implement cmpxchg(), and if the helper functions are inlined, in cmpxchg()
460 if self.try_cmpxchg(&mut old, new, o) { in try_cmpxchg()
476 fn try_cmpxchg<Ordering: ordering::Ordering>(&self, old: &mut T, new: T, _: Ordering) -> bool { in try_cmpxchg()
835 #[doc(alias("try_cmpxchg"))]
458 fn try_cmpxchg<Ordering: ordering::Ordering>(&self, old: &mut T, new: T, _: Ordering) -> bool { try_cmpxchg() function
/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/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.rs316 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/kernel/locking/
H A Dqspinlock_paravirt.h217 if (try_cmpxchg(&he->lock, &old, lock)) { in pv_hash()
/linux/drivers/hv/
H A Dhyperv_vmbus.h374 if (!try_cmpxchg(&msg->header.message_type, in vmbus_signal_eom()
H A Dmshv_eventfd.c132 if (!try_cmpxchg(&vp->vp_register_page->interrupt_vectors.as_uint64, in mshv_vp_irq_try_set_vector()
/linux/include/net/
H A Daf_vsock.h295 if (try_cmpxchg(&net->vsock.child_ns_mode_locked, in vsock_net_set_child_mode()
/linux/arch/s390/kvm/
H A Dgaccess.c160 } while (!try_cmpxchg(&ic->val, &old.val, new.val)); in ipte_lock_simple()
178 } while (!try_cmpxchg(&ic->val, &old.val, new.val)); in ipte_unlock_simple()
199 } while (!try_cmpxchg(&ic->val, &old.val, new.val)); in ipte_lock_siif()
213 } while (!try_cmpxchg(&ic->val, &old.val, new.val)); in ipte_unlock_siif()
/linux/io_uring/
H A Dtw.c
/linux/kernel/trace/
H A Dsimple_ring_buffer.c44 return try_cmpxchg(link, &old, new); in simple_bpage_unset_head_link()
/linux/arch/x86/events/amd/
H A Duncore.c225 if (try_cmpxchg(&ctx->events[i], &tmp, event)) { in amd_uncore_add()
261 if (try_cmpxchg(&ctx->events[i], &tmp, NULL)) in amd_uncore_del()
/linux/kernel/cgroup/
H A Drstat.c118 if (!try_cmpxchg(&rstatc->lnode.next, &self, NULL)) in __css_rstat_updated()
/linux/arch/x86/include/asm/
H A Dpgtable.h1284 } while (!try_cmpxchg((long *)&ptep->pte, (long *)&old_pte, *(long *)&new_pte)); in ptep_set_wrprotect()
1295 return try_cmpxchg((long *)&ptep->pte, (long *)&old_pte, *(long *)&new_pte);
1356 } while (!try_cmpxchg((long *)pmdp, (long *)&old_pmd, *(long *)&new_pmd)); in pmdp_establish()
/linux/arch/x86/mm/pat/
H A Dmemtype.c168 } while (!try_cmpxchg(&pg->flags.f, &old_flags, new_flags)); in set_page_memtype()
/linux/arch/x86/xen/
H A Dp2m.c562 /* try_cmpxchg() updates missing_mfn on failure. */ in xen_alloc_p2m_entry()
563 if (try_cmpxchg(top_mfn_p, &missing_mfn, mid_mfn_mfn)) { in xen_alloc_p2m_entry()
/linux/block/
H A Dblk-core.c1073 likely(try_cmpxchg(&part->bd_stamp, &stamp, now)) && in bdev_end_io_acct()
/linux/fs/
H A Dinode.c2930 if (try_cmpxchg(&inode->i_ctime_nsec, &cur, now.tv_nsec)) { in inode_set_ctime_deleg()
2977 /* pairs with try_cmpxchg below */
3005 if (try_cmpxchg(&inode->i_ctime_nsec, &cur, update.tv_nsec)) {
H A Dposix_acl.c177 if (unlikely(!try_cmpxchg(p, &sentinel, acl))) in __get_acl()

12