Home
last modified time | relevance | path

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

12

/linux/tools/include/linux/
H A Datomic.h15 static inline bool atomic_try_cmpxchg(atomic_t *ptr, int *oldp, int new) in atomic_try_cmpxchg() function
32 } while (!atomic_try_cmpxchg(v, &c, c + 1)); in atomic_inc_unless_negative()
/linux/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/kernel/futex/
H A Drequeue.c126 } while (!atomic_try_cmpxchg(&q->requeue_state, &old, new)); in futex_requeue_pi_prepare()
154 } while (!atomic_try_cmpxchg(&q->requeue_state, &old, new)); in futex_requeue_pi_complete()
180 } while (!atomic_try_cmpxchg(&q->requeue_state, &old, new)); in futex_requeue_pi_wakeup_sync()
/linux/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/arch/x86/kernel/
H A Dsmp.c160 if (!atomic_try_cmpxchg(&stopping_cpu, &old_cpu, this_cpu)) in native_stop_other_cpus()
/linux/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/kernel/
H A Dpanic.c406 if (!atomic_try_cmpxchg(&panic_redirect_cpu, &old_cpu, this_cpu)) in panic_try_force_cpu()
463 return atomic_try_cmpxchg(&panic_cpu, &old_cpu, this_cpu); in panic_try_start()
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 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/rust/kernel/sync/
H A Datomic.rs466 OrderingType::Full => T::Repr::atomic_try_cmpxchg(&self.0, &mut tmp, new), in try_cmpxchg()
/linux/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/kernel/bpf/
H A Drqspinlock.c283 if (val || !atomic_try_cmpxchg(&lock->val, &val, 1)) { in resilient_tas_spin_lock()
H A Dringbuf.c832 if (!atomic_try_cmpxchg(&rb->busy, &busy, 1)) in BPF_CALL_4()
/linux/kernel/time/
H A Dtimer_migration.c690 } while (!atomic_try_cmpxchg(&group->migr_state, &curstate.state, newstate.state)); in tmigr_active_up()
1327 if (atomic_try_cmpxchg(&group->migr_state, &curstate.state, newstate.state)) { in tmigr_inactive_up()
H A Dtick-sched.c216 if (inp || !atomic_try_cmpxchg(&in_progress, &inp, 1)) in tick_limited_update_jiffies64()
/linux/net/rxrpc/
H A Dconn_object.c431 if (!atomic_try_cmpxchg(&conn->active, &active, -1)) in rxrpc_service_connection_reaper()
/linux/arch/x86/kernel/cpu/
H A Dmshyperv.c384 if (!atomic_try_cmpxchg(&nmi_cpu, &old_cpu, this_cpu)) in hv_nmi_unknown()
/linux/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/drivers/net/ipa/
H A Dgsi_trans.c311 } while (!atomic_try_cmpxchg(&trans_info->tre_avail, &avail, new)); in gsi_trans_tre_reserve()
/linux/drivers/ptp/
H A Dptp_vmclock.c423 if (atomic_try_cmpxchg(&fst->seq, &old_seq, seq) || in vmclock_miscdev_read()
/linux/lib/
H A Dsbitmap.c629 } while (!atomic_try_cmpxchg(&sbq->wakeup_cnt, in sbitmap_queue_wake_up()
/linux/rust/helpers/
H A Datomic.c425 return atomic_try_cmpxchg(v, old, new); in rust_helper_atomic_cmpxchg_relaxed()
/linux/kernel/printk/
H A Dnbcon.c159 return atomic_try_cmpxchg(&ACCESS_PRIVATE(con, nbcon_state), &cur->atom, new->atom); in nbcon_state_try_cmpxchg()
/linux/mm/kasan/
H A Dkasan_test_c.c789 KUNIT_EXPECT_KASAN_FAIL(test, atomic_try_cmpxchg(unsafe, safe, 42)); in kasan_atomics_helper()
796 KUNIT_EXPECT_KASAN_FAIL(test, atomic_try_cmpxchg(safe, unsafe, 42)); in kasan_atomics_helper()
/linux/block/
H A Dblk-iolatency.c423 if (!atomic_try_cmpxchg(&iolat->scale_cookie, &our_cookie, cur_cookie)) { in check_scale_change()

12