| /linux/tools/include/linux/ |
| H A D | atomic.h | 15 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 D | atomic_t.txt | 39 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/block/ |
| H A D | blk-cgroup.h | 397 while (old && !atomic_try_cmpxchg(&blkg->use_delay, &old, old - 1)) in blkcg_unuse_delay() 421 if (!old && atomic_try_cmpxchg(&blkg->use_delay, &old, -1)) in blkcg_set_delay() 438 if (old && atomic_try_cmpxchg(&blkg->use_delay, &old, 0)) in blkcg_clear_delay()
|
| H A D | blk-rq-qos.c | 16 } while (!atomic_try_cmpxchg(v, &cur, cur + 1)); in atomic_inc_below()
|
| /linux/arch/loongarch/include/asm/ |
| H A D | qspinlock.h | 29 if (val || !atomic_try_cmpxchg(&lock->val, &val, _Q_LOCKED_VAL)) { in virt_spin_lock()
|
| /linux/kernel/futex/ |
| H A D | requeue.c | 126 } 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/arch/x86/include/asm/ |
| H A D | qspinlock.h | 104 if (val || !atomic_try_cmpxchg(&lock->val, &val, _Q_LOCKED_VAL)) { in virt_spin_lock()
|
| /linux/include/asm-generic/ |
| H A D | ticket_spinlock.h | 60 return atomic_try_cmpxchg(&lock->val, &old, old + (1<<16)); /* SC, for RCsc */ in ticket_spin_trylock()
|
| /linux/arch/x86/kernel/ |
| H A D | smp.c | 160 if (!atomic_try_cmpxchg(&stopping_cpu, &old_cpu, this_cpu)) in native_stop_other_cpus()
|
| /linux/mm/ |
| H A D | swap_cgroup.c | 49 } while (!atomic_try_cmpxchg(&sc->ids, &old_ids, new_ids)); in __swap_cgroup_id_xchg()
|
| /linux/drivers/misc/ |
| H A D | ntsync.c | 278 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/rust/kernel/sync/ |
| H A D | atomic.rs | 455 OrderingType::Full => T::Repr::atomic_try_cmpxchg(&self.0, &mut tmp, new), in try_cmpxchg()
|
| /linux/kernel/ |
| H A D | jump_label.c | 145 } 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 D | panic.c | 315 return atomic_try_cmpxchg(&panic_cpu, &old_cpu, this_cpu); in panic_try_start()
|
| H A D | cpu.c | 321 if (!atomic_try_cmpxchg(st, &sync, next_state)) in cpuhp_wait_for_sync_state() 370 } while (!atomic_try_cmpxchg(st, &sync, SYNC_STATE_SHOULD_DIE)); in cpuhp_bp_sync_dead() 425 if (!atomic_try_cmpxchg(st, &sync, SYNC_STATE_KICKED)) in cpuhp_can_boot_ap()
|
| /linux/fs/gfs2/ |
| H A D | log.c | 443 if (atomic_try_cmpxchg(&sdp->sd_log_revokes_available, in __gfs2_log_try_reserve_revokes() 497 if (atomic_try_cmpxchg(&sdp->sd_log_blks_free, &free_blocks, in __gfs2_log_try_reserve() 539 if (atomic_try_cmpxchg(&sdp->sd_log_blks_free, in __gfs2_log_reserve()
|
| /linux/include/linux/ |
| H A D | jump_label.h | 299 } while (!likely(atomic_try_cmpxchg(&key->enabled, &v, v + 1))); in static_key_fast_inc_not_disabled()
|
| /linux/kernel/time/ |
| H A D | timer_migration.c | 652 } 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/kernel/bpf/ |
| H A D | rqspinlock.c | 292 if (val || !atomic_try_cmpxchg(&lock->val, &val, 1)) { in resilient_tas_spin_lock()
|
| H A D | ringbuf.c | 755 if (!atomic_try_cmpxchg(&rb->busy, &busy, 1)) in BPF_CALL_4()
|
| /linux/arch/x86/kernel/cpu/ |
| H A D | mshyperv.c | 344 if (!atomic_try_cmpxchg(&nmi_cpu, &old_cpu, this_cpu)) in hv_nmi_unknown()
|
| /linux/net/rxrpc/ |
| H A D | conn_object.c | 431 if (!atomic_try_cmpxchg(&conn->active, &active, -1)) in rxrpc_service_connection_reaper()
|
| /linux/drivers/gpu/drm/i915/ |
| H A D | i915_sw_fence.c | 234 } while (!atomic_try_cmpxchg(&fence->pending, &pending, pending + 1)); in i915_sw_fence_await()
|
| /linux/drivers/net/ipa/ |
| H A D | gsi_trans.c | 311 } while (!atomic_try_cmpxchg(&trans_info->tre_avail, &avail, new)); in gsi_trans_tre_reserve()
|
| /linux/lib/ |
| H A D | sbitmap.c | 629 } while (!atomic_try_cmpxchg(&sbq->wakeup_cnt, in sbitmap_queue_wake_up()
|