Home
last modified time | relevance | path

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

12

/linux-6.15/arch/loongarch/include/asm/
H A Dqspinlock.h29 if (val || !atomic_try_cmpxchg(&lock->val, &val, _Q_LOCKED_VAL)) { in virt_spin_lock()
/linux-6.15/block/
H A Dblk-cgroup.h402 while (old && !atomic_try_cmpxchg(&blkg->use_delay, &old, old - 1)) in blkcg_unuse_delay()
426 if (!old && atomic_try_cmpxchg(&blkg->use_delay, &old, -1)) in blkcg_set_delay()
443 if (old && atomic_try_cmpxchg(&blkg->use_delay, &old, 0)) in blkcg_clear_delay()
H A Dblk-rq-qos.c16 } while (!atomic_try_cmpxchg(v, &cur, cur + 1)); in atomic_inc_below()
/linux-6.15/Documentation/
H A Datomic_t.txt39 atomic_try_cmpxchg{,_relaxed,_acquire,_release}()
280 bool atomic_try_cmpxchg(atomic_t *ptr, int *oldp, int new);
285 bool atomic_try_cmpxchg(atomic_t *ptr, int *oldp, int new)
298 (void)atomic_try_cmpxchg(ptr, &old, new);
307 tmp = atomic_cmpxchg(&v, old, new); } while (!atomic_try_cmpxchg(&v, &old, new));
334 } while (!atomic_try_cmpxchg(&v, &old, new));
/linux-6.15/kernel/futex/
H A Drequeue.c121 } while (!atomic_try_cmpxchg(&q->requeue_state, &old, new)); in futex_requeue_pi_prepare()
149 } while (!atomic_try_cmpxchg(&q->requeue_state, &old, new)); in futex_requeue_pi_complete()
175 } while (!atomic_try_cmpxchg(&q->requeue_state, &old, new)); in futex_requeue_pi_wakeup_sync()
/linux-6.15/arch/x86/include/asm/
H A Dqspinlock.h104 if (val || !atomic_try_cmpxchg(&lock->val, &val, _Q_LOCKED_VAL)) { in virt_spin_lock()
/linux-6.15/include/asm-generic/
H A Dticket_spinlock.h60 return atomic_try_cmpxchg(&lock->val, &old, old + (1<<16)); /* SC, for RCsc */ in ticket_spin_trylock()
/linux-6.15/arch/x86/kernel/
H A Dsmp.c160 if (!atomic_try_cmpxchg(&stopping_cpu, &old_cpu, this_cpu)) in native_stop_other_cpus()
/linux-6.15/mm/
H A Dswap_cgroup.c49 } while (!atomic_try_cmpxchg(&sc->ids, &old_ids, new_ids)); in __swap_cgroup_id_xchg()
/linux-6.15/kernel/
H A Dpanic.c204 if (atomic_try_cmpxchg(&panic_cpu, &old_cpu, this_cpu)) in nmi_panic()
334 if (atomic_try_cmpxchg(&panic_cpu, &old_cpu, this_cpu)) { in panic()
H A Djump_label.c145 } while (!likely(atomic_try_cmpxchg(&key->enabled, &v, v + 1))); in static_key_fast_inc_not_disabled()
287 } while (!likely(atomic_try_cmpxchg(&key->enabled, &v, v - 1))); in static_key_dec_not_one()
H A Dcrash_core.c141 if (atomic_try_cmpxchg(&panic_cpu, &old_cpu, this_cpu)) { in crash_kexec()
H A Dcpu.c320 if (!atomic_try_cmpxchg(st, &sync, next_state)) in cpuhp_wait_for_sync_state()
369 } while (!atomic_try_cmpxchg(st, &sync, SYNC_STATE_SHOULD_DIE)); in cpuhp_bp_sync_dead()
424 if (!atomic_try_cmpxchg(st, &sync, SYNC_STATE_KICKED)) in cpuhp_can_boot_ap()
/linux-6.15/drivers/misc/
H A Dntsync.c278 if (can_wake && atomic_try_cmpxchg(&q->signaled, &signaled, 0)) { in try_wake_all()
333 if (atomic_try_cmpxchg(&q->signaled, &signaled, entry->index)) { in try_wake_any_sem()
356 if (atomic_try_cmpxchg(&q->signaled, &signaled, entry->index)) { in try_wake_any_mutex()
381 if (atomic_try_cmpxchg(&q->signaled, &signaled, entry->index)) { in try_wake_any_event()
/linux-6.15/fs/gfs2/
H A Dlog.c438 if (atomic_try_cmpxchg(&sdp->sd_log_revokes_available, in __gfs2_log_try_reserve_revokes()
492 if (atomic_try_cmpxchg(&sdp->sd_log_blks_free, &free_blocks, in __gfs2_log_try_reserve()
534 if (atomic_try_cmpxchg(&sdp->sd_log_blks_free, in __gfs2_log_reserve()
/linux-6.15/include/linux/
H A Djump_label.h299 } while (!likely(atomic_try_cmpxchg(&key->enabled, &v, v + 1))); in static_key_fast_inc_not_disabled()
/linux-6.15/arch/x86/kernel/cpu/
H A Dmshyperv.c337 if (!atomic_try_cmpxchg(&nmi_cpu, &old_cpu, this_cpu)) in hv_nmi_unknown()
/linux-6.15/kernel/bpf/
H A Drqspinlock.c292 if (val || !atomic_try_cmpxchg(&lock->val, &val, 1)) { in resilient_tas_spin_lock()
H A Dringbuf.c753 if (!atomic_try_cmpxchg(&rb->busy, &busy, 1)) in BPF_CALL_4()
/linux-6.15/kernel/time/
H A Dtimer_migration.c652 } while (!atomic_try_cmpxchg(&group->migr_state, &curstate.state, newstate.state)); in tmigr_active_up()
1299 if (atomic_try_cmpxchg(&group->migr_state, &curstate.state, newstate.state)) { in tmigr_inactive_up()
/linux-6.15/net/rxrpc/
H A Dconn_object.c429 if (!atomic_try_cmpxchg(&conn->active, &active, -1)) in rxrpc_service_connection_reaper()
/linux-6.15/drivers/gpu/drm/i915/
H A Di915_sw_fence.c234 } while (!atomic_try_cmpxchg(&fence->pending, &pending, pending + 1)); in i915_sw_fence_await()
/linux-6.15/drivers/net/ipa/
H A Dgsi_trans.c311 } while (!atomic_try_cmpxchg(&trans_info->tre_avail, &avail, new)); in gsi_trans_tre_reserve()
/linux-6.15/kernel/printk/
H A Dnbcon.c154 return atomic_try_cmpxchg(&ACCESS_PRIVATE(con, nbcon_state), &cur->atom, new->atom); in nbcon_state_try_cmpxchg()
/linux-6.15/lib/
H A Dsbitmap.c613 } while (!atomic_try_cmpxchg(&sbq->wakeup_cnt, in sbitmap_queue_wake_up()

12