| /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/arch/loongarch/include/asm/ |
| H A D | qspinlock.h | 28 if (val || !atomic_try_cmpxchg(&lock->val, &val, _Q_LOCKED_VAL)) { in virt_spin_lock()
|
| /linux/block/ |
| H A D | blk-cgroup.h | 419 while (old && !atomic_try_cmpxchg(&blkg->use_delay, &old, old - 1)) in blkcg_unuse_delay() 443 if (!old && atomic_try_cmpxchg(&blkg->use_delay, &old, -1)) in blkcg_set_delay() 460 if (old && atomic_try_cmpxchg(&blkg->use_delay, &old, 0)) in blkcg_clear_delay()
|
| H A D | blk-iolatency.c | 423 if (!atomic_try_cmpxchg(&iolat->scale_cookie, &our_cookie, cur_cookie)) { in check_scale_change()
|
| /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/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/rust/kernel/sync/ |
| H A D | atomic.rs | 424 "atomic_try_cmpxchg", in cmpxchg() 440 // 44fe84459faf ("locking/atomic: Fix atomic_try_cmpxchg() semantics"), the in cmpxchg() 441 // atomic_try_cmpxchg() on x86 has a branch even if the caller doesn't care about the in cmpxchg() 480 // INVARIANT: `self.0` is a valid `T` after `atomic_try_cmpxchg*()` because `new` is in try_cmpxchg() 484 OrderingType::Full => T::Repr::atomic_try_cmpxchg(&self.0, &mut tmp, new),
|
| /linux/kernel/bpf/ |
| H A D | rqspinlock.c | 283 if (val || !atomic_try_cmpxchg(&lock->val, &val, 1)) { in resilient_tas_spin_lock()
|
| H A D | ringbuf.c | 832 if (!atomic_try_cmpxchg(&rb->busy, &busy, 1)) in BPF_CALL_4()
|
| /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/drivers/ptp/ |
| H A D | ptp_vmclock.c | 424 if (atomic_try_cmpxchg(&fst->seq, &old_seq, seq) || in vmclock_miscdev_read()
|
| /linux/lib/ |
| H A D | sbitmap.c | 629 } while (!atomic_try_cmpxchg(&sbq->wakeup_cnt, in sbitmap_queue_wake_up()
|
| /linux/rust/helpers/ |
| H A D | atomic.c | 425 return atomic_try_cmpxchg(v, old, new); in rust_helper_atomic_cmpxchg_relaxed()
|
| /linux/samples/vfio-mdev/ |
| H A D | mbochs.c | 527 } while (!atomic_try_cmpxchg(&mbochs_avail_mbytes, &avail_mbytes, in mbochs_init_dev()
|
| H A D | mtty.c | 1322 } while (!atomic_try_cmpxchg(&mdev_avail_ports, in mtty_init_dev()
|
| /linux/net/ipv4/ |
| H A D | icmp.c | 263 } while (!atomic_try_cmpxchg(&net->ipv4.icmp_global_credit, &old, new)); in icmp_global_allow()
|
| /linux/sound/usb/ |
| H A D | endpoint.c | 140 return atomic_try_cmpxchg(&ep->state, &old, new); in ep_state_update()
|
| /linux/drivers/md/ |
| H A D | dm-verity-target.c | 192 } while (!atomic_try_cmpxchg(&v->corrupted_errs, &ce, ce + 1)); in verity_handle_err()
|
| /linux/net/netfilter/ipvs/ |
| H A D | ip_vs_conn.c | 1459 } while (!atomic_try_cmpxchg(&ipvs->conn_count, &count, count + 1)); in ip_vs_conn_new()
|
| /linux/io_uring/ |
| H A D | zcrx.c | 397 } while (!atomic_try_cmpxchg(uref, &old, old - refs)); in io_zcrx_put_niov_uref()
|
| /linux/net/ipv6/ |
| H A D | ip6_fib.c | 98 } while (!atomic_try_cmpxchg(&net->ipv6.fib6_sernum, &old, new)); in fib6_new_sernum()
|
| /linux/kernel/trace/ |
| H A D | ring_buffer.c | 5271 } while (!atomic_try_cmpxchg(&buffer->record_disabled, &rd, new_rd)); in ring_buffer_record_off() 5294 } while (!atomic_try_cmpxchg(&buffer->record_disabled, &rd, new_rd)); in ring_buffer_record_on()
|