atomic_cmpxchg 72 arch/h8300/include/asm/atomic.h static inline int atomic_cmpxchg(atomic_t *v, int old, int new) atomic_cmpxchg 381 arch/powerpc/kernel/smp.c while (atomic_cmpxchg(&__nmi_ipi_lock, 0, 1) == 1) { atomic_cmpxchg 391 arch/powerpc/kernel/smp.c while (atomic_cmpxchg(&__nmi_ipi_lock, 0, 1) == 1) atomic_cmpxchg 263 arch/powerpc/mm/book3s64/iommu_api.c if (atomic_cmpxchg(&mem->mapped, 1, 0) != 1) { atomic_cmpxchg 310 arch/riscv/include/asm/atomic.h #define atomic_cmpxchg atomic_cmpxchg atomic_cmpxchg 162 arch/s390/mm/pgalloc.c } while (atomic_cmpxchg(v, old, new) != old); atomic_cmpxchg 110 arch/sh/kernel/ftrace.c old = atomic_cmpxchg(&nmi_running, old, new); atomic_cmpxchg 149 arch/sh/kernel/ftrace.c if (!atomic_cmpxchg(&nmi_running, 0, MOD_CODE_WRITE_FLAG)) atomic_cmpxchg 154 arch/sh/kernel/ftrace.c } while (atomic_cmpxchg(&nmi_running, 0, MOD_CODE_WRITE_FLAG)); atomic_cmpxchg 28 arch/sparc/include/asm/atomic_32.h int atomic_cmpxchg(atomic_t *, int, int); atomic_cmpxchg 96 arch/sparc/lib/atomic32.c EXPORT_SYMBOL(atomic_cmpxchg); atomic_cmpxchg 100 arch/x86/include/asm/qspinlock.h } while (atomic_cmpxchg(&lock->val, 0, _Q_LOCKED_VAL) != 0); atomic_cmpxchg 412 arch/x86/kernel/apic/apic.c rsvd = atomic_cmpxchg(&eilvt_offsets[offset], rsvd, new); atomic_cmpxchg 186 arch/x86/kernel/cpu/mshyperv.c if (atomic_cmpxchg(&nmi_cpu, -1, raw_smp_processor_id()) != -1) atomic_cmpxchg 172 arch/x86/kernel/smp.c if (atomic_cmpxchg(&stopping_cpu, -1, safe_smp_processor_id()) != -1) atomic_cmpxchg 419 block/blk-iolatency.c old = atomic_cmpxchg(&iolat->scale_cookie, our_cookie, cur_cookie); atomic_cmpxchg 18 block/blk-rq-qos.c old = atomic_cmpxchg(v, cur, cur + 1); atomic_cmpxchg 87 drivers/block/drbd/drbd_actlog.c (r = atomic_cmpxchg(&device->md_io.in_use, 0, 1)) == 0 || atomic_cmpxchg 631 drivers/char/ipmi/ipmi_watchdog.c } else if (atomic_cmpxchg(&pretimeout_since_last_heartbeat, 1, 0)) { atomic_cmpxchg 802 drivers/firewire/core-device.c if (atomic_cmpxchg(&device->state, atomic_cmpxchg 891 drivers/firewire/core-device.c atomic_cmpxchg(&old->state, atomic_cmpxchg 1065 drivers/firewire/core-device.c if (atomic_cmpxchg(&device->state, atomic_cmpxchg 1142 drivers/firewire/core-device.c if (atomic_cmpxchg(&device->state, atomic_cmpxchg 1168 drivers/firewire/core-device.c if (atomic_cmpxchg(&device->state, atomic_cmpxchg 1266 drivers/firewire/core-device.c if (atomic_cmpxchg(&device->state, atomic_cmpxchg 1748 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c if (atomic_cmpxchg(&mem->invalid, invalid, 0) != invalid) atomic_cmpxchg 1920 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c if (atomic_cmpxchg(&process_info->evicted_bos, evicted_bos, 0) != atomic_cmpxchg 244 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c } while (atomic_cmpxchg(&drv->last_seq, last_seq, seq) != last_seq); atomic_cmpxchg 504 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h if (atomic_cmpxchg(&ras->in_recovery, 0, 1) == 0) atomic_cmpxchg 753 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c if (!atomic_cmpxchg(&adev->uvd.handles[i], 0, handle)) { atomic_cmpxchg 786 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c atomic_cmpxchg(&adev->uvd.handles[i], handle, 0); atomic_cmpxchg 691 drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c if (!atomic_cmpxchg(&p->adev->vce.handles[i], 0, handle)) { atomic_cmpxchg 817 drivers/gpu/drm/i915/gvt/kvmgt.c if (atomic_cmpxchg(&vgpu->vdev.released, 0, 1)) atomic_cmpxchg 15 drivers/gpu/drm/msm/adreno/a5xx_preempt.c enum preempt_state cur = atomic_cmpxchg(&a5xx_gpu->preempt_state, atomic_cmpxchg 843 drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c old = atomic_cmpxchg(&ddata->do_update, 1, 0); atomic_cmpxchg 522 drivers/gpu/drm/radeon/radeon_uvd.c if (!atomic_cmpxchg(&p->rdev->uvd.handles[i], 0, handle)) { atomic_cmpxchg 558 drivers/gpu/drm/radeon/radeon_uvd.c atomic_cmpxchg(&p->rdev->uvd.handles[i], handle, 0); atomic_cmpxchg 539 drivers/gpu/drm/radeon/radeon_vce.c if (!atomic_cmpxchg(&p->rdev->vce.handles[i], 0, handle)) { atomic_cmpxchg 680 drivers/gpu/drm/radeon/radeon_vce.c atomic_cmpxchg(&p->rdev->vce.handles[i], handle, 0); atomic_cmpxchg 62 drivers/gpu/host1x/hw/syncpt_hw.c } while ((u32)atomic_cmpxchg(&sp->min_val, old, live) != old); atomic_cmpxchg 251 drivers/gpu/host1x/intr.c while (atomic_cmpxchg(&waiter->state, WLS_PENDING, WLS_CANCELLED) == atomic_cmpxchg 320 drivers/gpu/host1x/intr.c if (atomic_cmpxchg(&waiter->state, atomic_cmpxchg 1305 drivers/hwtracing/intel_th/msu.c if (WARN_ON_ONCE(atomic_cmpxchg(&msc->user_count, -1, 0) != -1)) atomic_cmpxchg 1327 drivers/hwtracing/intel_th/msu.c count = atomic_cmpxchg(&msc->user_count, 0, -1); atomic_cmpxchg 86 drivers/infiniband/core/rdma_core.c return atomic_cmpxchg(&uobj->usecnt, 0, -1) == 0 ? 0 : -EBUSY; atomic_cmpxchg 174 drivers/infiniband/hw/ocrdma/ocrdma_ah.c if (atomic_cmpxchg(&dev->update_sl, 1, 0)) atomic_cmpxchg 2507 drivers/infiniband/hw/ocrdma/ocrdma_hw.c if (atomic_cmpxchg(&dev->update_sl, 1, 0)) atomic_cmpxchg 582 drivers/iommu/iova.c !atomic_cmpxchg(&iovad->fq_timer_on, 0, 1)) atomic_cmpxchg 77 drivers/irqchip/irq-mvebu-icu.c if (atomic_cmpxchg(&msi_data->initialized, false, true)) atomic_cmpxchg 101 drivers/md/bcache/alloc.c } while (atomic_cmpxchg(&c->rescale, r, r + next) != r); atomic_cmpxchg 104 drivers/md/bcache/io.c count = atomic_cmpxchg(&ca->io_count, old, new); atomic_cmpxchg 113 drivers/md/bcache/io.c errors = atomic_cmpxchg(&ca->io_errors, atomic_cmpxchg 744 drivers/media/pci/saa7164/saa7164-encoder.c if (atomic_cmpxchg(&fh->v4l_reading, 1, 0) == 1) { atomic_cmpxchg 812 drivers/media/pci/saa7164/saa7164-encoder.c if (atomic_cmpxchg(&fh->v4l_reading, 0, 1) == 0) { atomic_cmpxchg 913 drivers/media/pci/saa7164/saa7164-encoder.c if (atomic_cmpxchg(&fh->v4l_reading, 0, 1) == 0) { atomic_cmpxchg 449 drivers/media/pci/saa7164/saa7164-vbi.c if (atomic_cmpxchg(&fh->v4l_reading, 1, 0) == 1) { atomic_cmpxchg 516 drivers/media/pci/saa7164/saa7164-vbi.c if (atomic_cmpxchg(&fh->v4l_reading, 0, 1) == 0) { atomic_cmpxchg 617 drivers/media/pci/saa7164/saa7164-vbi.c if (atomic_cmpxchg(&fh->v4l_reading, 0, 1) == 0) { atomic_cmpxchg 1245 drivers/media/platform/omap3isp/isp.c if (atomic_cmpxchg(stopping, 1, 0)) { atomic_cmpxchg 859 drivers/media/rc/redrat3.c if (brightness != LED_OFF && atomic_cmpxchg(&rr3->flash, 0, 1) == 0) { atomic_cmpxchg 1783 drivers/media/usb/cx231xx/cx231xx-417.c if (atomic_cmpxchg(&fh->v4l_reading, 1, 0) == 1) { atomic_cmpxchg 1814 drivers/media/usb/cx231xx/cx231xx-417.c if (atomic_cmpxchg(&fh->v4l_reading, 0, 1) == 0) { atomic_cmpxchg 294 drivers/misc/cxl/main.c rc = atomic_cmpxchg(&adapter->contexts_num, 0, -1); atomic_cmpxchg 300 drivers/misc/cxl/main.c int val = atomic_cmpxchg(&adapter->contexts_num, -1, 0); atomic_cmpxchg 1127 drivers/misc/cxl/pci.c while (atomic_cmpxchg(&afu->configured_state, 0, -1) != -1) atomic_cmpxchg 629 drivers/misc/habanalabs/command_submission.c do_ctx_switch = atomic_cmpxchg(&ctx->thread_ctx_switch_token, 1, 0); atomic_cmpxchg 642 drivers/misc/habanalabs/device.c rc = atomic_cmpxchg(&hdev->in_reset, 0, 1); atomic_cmpxchg 827 drivers/misc/habanalabs/device.c rc = atomic_cmpxchg(&hdev->in_reset, 0, 1); atomic_cmpxchg 1329 drivers/misc/habanalabs/device.c rc = atomic_cmpxchg(&hdev->in_reset, 0, 1); atomic_cmpxchg 1332 drivers/misc/habanalabs/device.c rc = atomic_cmpxchg(&hdev->in_reset, 0, 1); atomic_cmpxchg 21 drivers/net/ethernet/aquantia/atlantic/aq_utils.h } while (atomic_cmpxchg(flags, flags_old, flags_new) != flags_old); atomic_cmpxchg 31 drivers/net/ethernet/aquantia/atlantic/aq_utils.h } while (atomic_cmpxchg(flags, flags_old, flags_new) != flags_old); atomic_cmpxchg 4171 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c old = atomic_cmpxchg((v), c, c + a); atomic_cmpxchg 4199 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c old = atomic_cmpxchg((v), c, c - a); atomic_cmpxchg 4103 drivers/net/ethernet/cavium/liquidio/lio_main.c atomic_cmpxchg(octeon_dev->adapter_fw_state, atomic_cmpxchg 4108 drivers/net/ethernet/cavium/liquidio/lio_main.c fw_state = atomic_cmpxchg(octeon_dev->adapter_fw_state, atomic_cmpxchg 1428 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c if (atomic_cmpxchg(&rep->rep_data[rep_type].state, atomic_cmpxchg 1490 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c if (atomic_cmpxchg(&rep->rep_data[rep_type].state, atomic_cmpxchg 633 drivers/net/ethernet/sfc/falcon/farch.c } else if (atomic_cmpxchg(&tx_queue->flush_outstanding, atomic_cmpxchg 1100 drivers/net/ethernet/sfc/falcon/farch.c if (atomic_cmpxchg(&tx_queue->flush_outstanding, 1, 0)) { atomic_cmpxchg 615 drivers/net/ethernet/sfc/farch.c } else if (atomic_cmpxchg(&tx_queue->flush_outstanding, atomic_cmpxchg 1088 drivers/net/ethernet/sfc/farch.c if (atomic_cmpxchg(&tx_queue->flush_outstanding, 1, 0)) { atomic_cmpxchg 343 drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c if (atomic_cmpxchg(&array[*idx].allocated, 0, 1) == 0) atomic_cmpxchg 313 drivers/platform/chrome/wilco_ec/event.c if (atomic_cmpxchg(&dev_data->available, 1, 0) == 0) atomic_cmpxchg 246 drivers/platform/chrome/wilco_ec/telemetry.c if (atomic_cmpxchg(&dev_data->available, 1, 0) == 0) atomic_cmpxchg 2304 drivers/rapidio/rio.c if (atomic_cmpxchg(&port->state, atomic_cmpxchg 2221 drivers/s390/block/dasd.c if (atomic_cmpxchg (&device->tasklet_scheduled, 0, 1) != 0) atomic_cmpxchg 3055 drivers/s390/block/dasd.c if (atomic_cmpxchg(&block->tasklet_scheduled, 0, 1) != 0) atomic_cmpxchg 82 drivers/s390/cio/ccwgroup.c if (atomic_cmpxchg(&gdev->onoff, 0, 1) != 0) atomic_cmpxchg 111 drivers/s390/cio/ccwgroup.c if (atomic_cmpxchg(&gdev->onoff, 0, 1) != 0) atomic_cmpxchg 191 drivers/s390/cio/ccwgroup.c if (atomic_cmpxchg(&gdev->onoff, 0, 1) != 0) atomic_cmpxchg 508 drivers/s390/cio/device.c if (atomic_cmpxchg(&cdev->private->onoff, 0, 1) != 0) atomic_cmpxchg 1337 drivers/s390/cio/device.c (atomic_cmpxchg(&cdev->private->onoff, 0, 1) == 0)) { atomic_cmpxchg 60 drivers/s390/cio/qdio_thinint.c if (!atomic_cmpxchg(&q_indicators[i].count, 0, 1)) atomic_cmpxchg 667 drivers/s390/net/qeth_core.h return atomic_cmpxchg(&channel->irq_pending, 0, 1) == 0; atomic_cmpxchg 451 drivers/s390/net/qeth_core_main.c if (atomic_cmpxchg(&buffer->state, QETH_QDIO_BUF_PRIMED, atomic_cmpxchg 1523 drivers/s390/net/qeth_core_main.c switch (atomic_cmpxchg(&card->qdio.state, QETH_QDIO_ESTABLISHED, atomic_cmpxchg 2334 drivers/s390/net/qeth_core_main.c if (atomic_cmpxchg(&card->qdio.state, QETH_QDIO_UNINITIALIZED, atomic_cmpxchg 3901 drivers/s390/net/qeth_core_main.c while (atomic_cmpxchg(&queue->state, QETH_OUT_Q_UNLOCKED, atomic_cmpxchg 4806 drivers/s390/net/qeth_core_main.c if (atomic_cmpxchg(&card->qdio.state, QETH_QDIO_ALLOCATED, atomic_cmpxchg 5227 drivers/s390/net/qeth_core_main.c if (atomic_cmpxchg(&buffer->state, QETH_QDIO_BUF_PRIMED, atomic_cmpxchg 315 drivers/staging/android/vsoc.c if (atomic_cmpxchg(owner_ptr, atomic_cmpxchg 679 drivers/staging/media/omap4iss/iss.c if (atomic_cmpxchg(stopping, 1, 0)) { atomic_cmpxchg 514 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c } while (atomic_cmpxchg(&service->poll_flags, value, atomic_cmpxchg 520 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c } while (atomic_cmpxchg( atomic_cmpxchg 1002 drivers/thermal/thermal_core.c if (atomic_cmpxchg(&pos->need_update, 1, 0)) atomic_cmpxchg 1352 drivers/thermal/thermal_core.c if (atomic_cmpxchg(&tz->need_update, 1, 0)) atomic_cmpxchg 1324 drivers/vfio/vfio.c int users = atomic_cmpxchg(&group->container_users, 1, 0); atomic_cmpxchg 1583 drivers/vfio/vfio.c opened = atomic_cmpxchg(&group->opened, 0, 1); atomic_cmpxchg 831 drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c old = atomic_cmpxchg(&ddata->do_update, 1, 0); atomic_cmpxchg 936 fs/aio.c avail = atomic_cmpxchg(&ctx->reqs_available, atomic_cmpxchg 5331 fs/btrfs/extent_io.c old = atomic_cmpxchg(&eb->refs, refs, refs - 1); atomic_cmpxchg 127 fs/erofs/internal.h if (val != atomic_cmpxchg(&grp->refcount, val, EROFS_LOCKED_MAGIC)) { atomic_cmpxchg 52 fs/erofs/utils.c if (atomic_cmpxchg(&grp->refcount, o, o + 1) != o) atomic_cmpxchg 381 fs/gfs2/log.c if (atomic_cmpxchg(&sdp->sd_log_blks_free, free_blocks, atomic_cmpxchg 140 fs/hfsplus/xattr.c if (old_state != atomic_cmpxchg(&sbi->attr_tree_state, atomic_cmpxchg 656 include/asm-generic/atomic-instrumented.h #define atomic_cmpxchg atomic_cmpxchg atomic_cmpxchg 906 include/asm-generic/atomic-long.h return atomic_cmpxchg(v, old, new); atomic_cmpxchg 865 include/linux/atomic-fallback.h #define atomic_cmpxchg_acquire atomic_cmpxchg atomic_cmpxchg 866 include/linux/atomic-fallback.h #define atomic_cmpxchg_release atomic_cmpxchg atomic_cmpxchg 867 include/linux/atomic-fallback.h #define atomic_cmpxchg_relaxed atomic_cmpxchg atomic_cmpxchg 891 include/linux/atomic-fallback.h #ifndef atomic_cmpxchg atomic_cmpxchg 901 include/linux/atomic-fallback.h #define atomic_cmpxchg atomic_cmpxchg atomic_cmpxchg 918 include/linux/atomic-fallback.h r = atomic_cmpxchg(v, o, new); atomic_cmpxchg 786 include/linux/blk-cgroup.h int cur = atomic_cmpxchg(&blkg->use_delay, old, old - 1); atomic_cmpxchg 806 include/linux/blk-cgroup.h int cur = atomic_cmpxchg(&blkg->use_delay, old, 0); atomic_cmpxchg 166 include/linux/page_ref.h int ret = likely(atomic_cmpxchg(&page->_refcount, count, 0) == count); atomic_cmpxchg 508 include/linux/sbitmap.h atomic_cmpxchg(index, old, new); atomic_cmpxchg 136 kernel/jump_label.c v1 = atomic_cmpxchg(&key->enabled, v, v + 1); atomic_cmpxchg 206 kernel/jump_label.c if (atomic_cmpxchg(&key->enabled, 1, 0)) atomic_cmpxchg 972 kernel/kexec_core.c old_cpu = atomic_cmpxchg(&panic_cpu, PANIC_CPU_INVALID, this_cpu); atomic_cmpxchg 129 kernel/panic.c old_cpu = atomic_cmpxchg(&panic_cpu, PANIC_CPU_INVALID, cpu); atomic_cmpxchg 201 kernel/panic.c old_cpu = atomic_cmpxchg(&panic_cpu, PANIC_CPU_INVALID, this_cpu); atomic_cmpxchg 102 kernel/printk/printk_safe.c if (atomic_cmpxchg(&s->len, len, len + add) != len) atomic_cmpxchg 228 kernel/printk/printk_safe.c if (atomic_cmpxchg(&s->len, len, 0) != len) atomic_cmpxchg 352 kernel/rcu/tree.c } while (atomic_cmpxchg(&rdp->dynticks, old, new) != old); atomic_cmpxchg 561 kernel/sched/psi.c if (atomic_cmpxchg(&group->poll_scheduled, 0, 1) != 0) atomic_cmpxchg 448 kernel/smpboot.c if (atomic_cmpxchg(&per_cpu(cpu_hotplug_state, cpu), atomic_cmpxchg 477 kernel/smpboot.c } while (atomic_cmpxchg(&per_cpu(cpu_hotplug_state, cpu), atomic_cmpxchg 3234 kernel/trace/ring_buffer.c } while (atomic_cmpxchg(&buffer->record_disabled, rd, new_rd) != rd); atomic_cmpxchg 3257 kernel/trace/ring_buffer.c } while (atomic_cmpxchg(&buffer->record_disabled, rd, new_rd) != rd); atomic_cmpxchg 182 kernel/ucount.c old = atomic_cmpxchg(v, c, c+1); atomic_cmpxchg 102 lib/dump_stack.c old = atomic_cmpxchg(&dump_lock, -1, cpu); atomic_cmpxchg 556 lib/sbitmap.c ret = atomic_cmpxchg(&ws->wait_cnt, wait_cnt, wake_batch); atomic_cmpxchg 146 mm/huge_memory.c if (atomic_cmpxchg(&huge_zero_refcount, 1, 0) == 1) { atomic_cmpxchg 1778 net/core/dev.c if (atomic_cmpxchg(&netstamp_wanted, wanted, wanted + 1) == wanted) atomic_cmpxchg 1798 net/core/dev.c if (atomic_cmpxchg(&netstamp_wanted, wanted, wanted - 1) == wanted) atomic_cmpxchg 97 net/ipv6/ip6_fib.c } while (atomic_cmpxchg(&net->ipv6.fib6_sernum, atomic_cmpxchg 32 net/netfilter/nft_numgen.c } while (atomic_cmpxchg(&priv->counter, oval, nval) != oval); atomic_cmpxchg 44 net/netfilter/xt_statistic.c } while (atomic_cmpxchg(&info->master->count, oval, nval) != oval); atomic_cmpxchg 400 net/rds/ib_send.c if (atomic_cmpxchg(&ic->i_credits, oldval, newval) != oldval) atomic_cmpxchg 801 net/rds/rds.h return atomic_cmpxchg(&cp->cp_state, old, new) == old; atomic_cmpxchg 421 net/rxrpc/conn_object.c if (atomic_cmpxchg(&conn->usage, 1, 0) != 1) atomic_cmpxchg 9 tools/include/linux/atomic.h #define atomic_cmpxchg_relaxed atomic_cmpxchg atomic_cmpxchg 10 tools/include/linux/atomic.h #define atomic_cmpxchg_release atomic_cmpxchg