Home
last modified time | relevance | path

Searched refs:atomic_xchg (Results 1 – 79 of 79) sorted by relevance

/linux-4.1.27/include/asm-generic/
Dmutex-xchg.h28 if (unlikely(atomic_xchg(count, 0) != 1)) in __mutex_fastpath_lock()
34 if (likely(atomic_xchg(count, -1) != 1)) in __mutex_fastpath_lock()
49 if (unlikely(atomic_xchg(count, 0) != 1)) in __mutex_fastpath_lock_retval()
50 if (likely(atomic_xchg(count, -1) != 1)) in __mutex_fastpath_lock_retval()
70 if (unlikely(atomic_xchg(count, 1) != 0)) in __mutex_fastpath_unlock()
94 int prev = atomic_xchg(count, 0); in __mutex_fastpath_trylock()
108 prev = atomic_xchg(count, prev); in __mutex_fastpath_trylock()
Datomic.h175 #define atomic_xchg(ptr, v) (xchg(&(ptr)->counter, (v))) macro
Datomic-long.h254 (atomic_xchg((atomic_t *)(v), (new)))
/linux-4.1.27/drivers/video/backlight/
Dapple_bl.c226 if (atomic_xchg(&apple_bl_registered, 1) == 0) in apple_bl_register()
235 if (atomic_xchg(&apple_bl_registered, 0) == 1) in apple_bl_unregister()
/linux-4.1.27/arch/sparc/lib/
Datomic32.c48 int atomic_xchg(atomic_t *v, int new) in atomic_xchg() function
59 EXPORT_SYMBOL(atomic_xchg);
/linux-4.1.27/arch/m68k/include/asm/
Datomic.h121 #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) macro
138 static inline int atomic_xchg(atomic_t *v, int new) in atomic_xchg() function
/linux-4.1.27/arch/sparc/include/asm/
Datomic_32.h25 int atomic_xchg(atomic_t *, int);
Datomic_64.h73 #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) in ATOMIC_OPS() macro
/linux-4.1.27/arch/sh/include/asm/
Datomic.h38 #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) macro
/linux-4.1.27/arch/arc/include/asm/
Dcmpxchg.h159 #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) macro
/linux-4.1.27/arch/tile/include/asm/
Datomic.h123 static inline int atomic_xchg(atomic_t *v, int n) in atomic_xchg() function
/linux-4.1.27/drivers/net/wireless/cw1200/
Dbh.c460 rx = atomic_xchg(&priv->bh_rx, 0); in cw1200_bh()
461 tx = atomic_xchg(&priv->bh_tx, 0); in cw1200_bh()
462 term = atomic_xchg(&priv->bh_term, 0); in cw1200_bh()
Dscan.c332 atomic_xchg(&priv->recent_scan, 0); in cw1200_clear_recent_scan_work()
339 if (atomic_xchg(&priv->scan.in_progress, 0)) { in cw1200_scan_timeout()
Dsta.c139 if (atomic_xchg(&priv->tx_lock, 1) != 1) in cw1200_stop()
143 atomic_xchg(&priv->tx_lock, 0); /* for recovery to work */ in cw1200_stop()
/linux-4.1.27/drivers/md/bcache/
Dwriteback.h73 !atomic_xchg(&dc->has_dirty, 1)) { in bch_writeback_add()
Dstats.c154 unsigned t = atomic_xchg(&acc->collector.name, 0); \ in scale_accounting()
Dsuper.c883 if (atomic_xchg(&dc->running, 1)) { in bch_cached_dev_run()
/linux-4.1.27/arch/metag/include/asm/
Datomic_lnkget.h140 static inline int atomic_xchg(atomic_t *v, int new) in atomic_xchg() function
Datomic_lock1.h112 #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) macro
/linux-4.1.27/arch/hexagon/include/asm/
Datomic.h58 #define atomic_xchg(v, new) (xchg(&((v)->counter), (new))) macro
/linux-4.1.27/arch/x86/include/asm/
Datomic.h180 static inline int atomic_xchg(atomic_t *v, int new) in atomic_xchg() function
/linux-4.1.27/kernel/locking/
Dosq_lock.c95 old = atomic_xchg(&lock->tail, curr); in osq_lock()
Dmutex.c535 if (!mutex_is_locked(lock) && (atomic_xchg(&lock->count, 0) == 1)) in __mutex_lock_common()
559 (atomic_xchg(&lock->count, -1) == 1)) in __mutex_lock_common()
873 prev = atomic_xchg(&lock->count, -1); in __mutex_trylock_slowpath()
/linux-4.1.27/arch/mn10300/include/asm/
Datomic.h127 #define atomic_xchg(ptr, v) (xchg(&(ptr)->counter, (v))) macro
/linux-4.1.27/arch/avr32/include/asm/
Datomic.h169 #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) macro
/linux-4.1.27/kernel/
Dhung_task.c235 if (atomic_xchg(&reset_hung_task, 0)) in watchdog()
Dsmpboot.c400 (void)atomic_xchg(&per_cpu(cpu_hotplug_state, cpu), CPU_ONLINE); in cpu_set_state_online()
/linux-4.1.27/arch/xtensa/include/asm/
Datomic.h227 #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) in ATOMIC_OPS() macro
/linux-4.1.27/arch/m32r/include/asm/
Datomic.h216 #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) macro
/linux-4.1.27/arch/frv/include/asm/
Datomic.h180 #define atomic_xchg(v, new) (xchg(&(v)->counter, new)) macro
/linux-4.1.27/drivers/gpu/drm/nouveau/
Dnouveau_usif.c204 if (atomic_xchg(&ntfy->enabled, 1)) in usif_notify_get()
244 if (ret == 0 && atomic_xchg(&ntfy->enabled, 0)) in usif_notify_put()
/linux-4.1.27/drivers/platform/x86/
Ddell-smo8800.c100 (data = atomic_xchg(&smo8800->counter, 0))); in smo8800_misc_read()
/linux-4.1.27/arch/alpha/include/asm/
Datomic.h123 #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) in ATOMIC_OPS() macro
/linux-4.1.27/arch/arm64/include/asm/
Datomic.h114 #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) macro
/linux-4.1.27/arch/ia64/include/asm/
Datomic.h119 #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) macro
/linux-4.1.27/kernel/debug/
Ddebug_core.c507 atomic_xchg(&kgdb_active, cpu); in kgdb_cpu_enter()
522 atomic_xchg(&kgdb_active, cpu); in kgdb_cpu_enter()
/linux-4.1.27/arch/blackfin/mach-common/
Dsmp.c150 while ((pending = atomic_xchg(&bfin_ipi_data->bits, 0)) != 0) { in ipi_handler_int1()
/linux-4.1.27/arch/parisc/include/asm/
Datomic.h75 #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) macro
/linux-4.1.27/arch/s390/include/asm/
Datomic.h131 #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) macro
/linux-4.1.27/arch/powerpc/include/asm/
Datomic.h155 #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) macro
/linux-4.1.27/mm/
Dswap_state.c402 pages = atomic_xchg(&swapin_readahead_hits, 0) + 2; in swapin_nr_pages()
/linux-4.1.27/arch/mips/mm/
Dpage.c275 if (atomic_xchg(&run_once, 1)) { in build_clear_page()
422 if (atomic_xchg(&run_once, 1)) { in build_copy_page()
/linux-4.1.27/drivers/gpu/host1x/
Dintr.c154 WARN_ON(atomic_xchg(&waiter->state, WLS_HANDLED) != in run_handlers()
/linux-4.1.27/arch/mips/include/asm/
Datomic.h212 #define atomic_xchg(v, new) (xchg(&((v)->counter), (new))) macro
/linux-4.1.27/arch/arm/include/asm/
Datomic.h201 #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) macro
/linux-4.1.27/arch/s390/oprofile/
Dhwsampler.c190 atomic_xchg(&cb->ext_params, atomic_read(&cb->ext_params) | param32); in hws_ext_handler()
862 ext_params = atomic_xchg(&cb->ext_params, 0); in worker()
/linux-4.1.27/kernel/trace/
Dtrace_mmiotrace.c127 unsigned long cnt = atomic_xchg(&dropped_count, 0); in count_overruns()
/linux-4.1.27/arch/sh/drivers/dma/
Ddma-api.c201 if (atomic_xchg(&channel->busy, 1)) in request_dma()
/linux-4.1.27/fs/btrfs/
Dvolumes.h514 ret = atomic_xchg(dev->dev_stat_values + index, 0); in btrfs_dev_stat_read_and_reset()
Ddev-replace.c791 WARN_ON(atomic_xchg( in btrfs_resume_dev_replace_async()
Dioctl.c1484 if (atomic_xchg(&root->fs_info->mutually_exclusive_operation_running, in btrfs_ioctl_resize()
2612 if (atomic_xchg(&root->fs_info->mutually_exclusive_operation_running, in btrfs_ioctl_add_dev()
2658 if (atomic_xchg(&root->fs_info->mutually_exclusive_operation_running, in btrfs_ioctl_rm_dev()
4307 if (atomic_xchg( in btrfs_ioctl_dev_replace()
4513 if (!atomic_xchg(&fs_info->mutually_exclusive_operation_running, 1)) { in btrfs_ioctl_balance()
Dvolumes.c3613 WARN_ON(atomic_xchg(&fs_info->mutually_exclusive_operation_running, 1)); in btrfs_recover_balance()
/linux-4.1.27/net/ceph/
Dmessenger.c330 old_state = atomic_xchg(&con->sock_state, CON_SOCK_STATE_CLOSED); in con_sock_state_init()
341 old_state = atomic_xchg(&con->sock_state, CON_SOCK_STATE_CONNECTING); in con_sock_state_connecting()
352 old_state = atomic_xchg(&con->sock_state, CON_SOCK_STATE_CONNECTED); in con_sock_state_connected()
363 old_state = atomic_xchg(&con->sock_state, CON_SOCK_STATE_CLOSING); in con_sock_state_closing()
376 old_state = atomic_xchg(&con->sock_state, CON_SOCK_STATE_CLOSED); in con_sock_state_closed()
/linux-4.1.27/drivers/gpu/drm/msm/mdp/mdp4/
Dmdp4_crtc.c520 pending = atomic_xchg(&mdp4_crtc->pending, 0); in mdp4_crtc_vblank_irq()
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/subdev/clk/
Dbase.c206 if (!atomic_xchg(&clk->waiting, 0)) in nvkm_pstate_work()
/linux-4.1.27/drivers/net/wireless/ath/wil6210/
Ddebugfs.c1149 int rx = atomic_xchg(&wil->isr_count_rx, 0); in wil_info_debugfs_show()
1150 int tx = atomic_xchg(&wil->isr_count_tx, 0); in wil_info_debugfs_show()
/linux-4.1.27/drivers/staging/nvec/
Dnvec.c178 if (atomic_xchg(&nvec->msg_pool[i].used, 1) == 0) { in nvec_msg_alloc()
/linux-4.1.27/drivers/gpu/drm/msm/mdp/mdp5/
Dmdp5_crtc.c587 pending = atomic_xchg(&mdp5_crtc->pending, 0); in mdp5_crtc_vblank_irq()
/linux-4.1.27/Documentation/
Datomic_ops.txt254 int atomic_xchg(atomic_t *v, int new);
260 atomic_xchg must provide explicit memory barriers around the operation.
Dmemory-barriers.txt2377 atomic_xchg(); atomic_long_xchg();
/linux-4.1.27/drivers/firewire/
Dcore-device.c1320 if (atomic_xchg(&device->state, in fw_node_event()
/linux-4.1.27/drivers/misc/lis3lv02d/
Dlis3lv02d.c618 data = atomic_xchg(&lis3->count, 0); in lis3lv02d_misc_read()
/linux-4.1.27/kernel/rcu/
Drcutorture.c1026 if (atomic_xchg(&beenhere, 1) != 0) in rcutorture_trace_dump()
/linux-4.1.27/fs/
Daio.c796 if (atomic_xchg(&ctx->dead, 1)) { in kill_ioctx()
/linux-4.1.27/drivers/infiniband/ulp/srpt/
Dib_srpt.c1542 __constant_cpu_to_be32(1 + atomic_xchg(&ch->req_lim_delta, 0)); in srpt_build_cmd_rsp()
1593 + atomic_xchg(&ch->req_lim_delta, 0)); in srpt_build_tskmgmt_rsp()
/linux-4.1.27/drivers/s390/net/
Dqeth_core_main.c2547 if (atomic_xchg(&card->qdio.state, QETH_QDIO_UNINITIALIZED) == in qeth_free_qdio_buffers()
3582 if (atomic_xchg(&queue->state, QETH_OUT_Q_LOCKED_FLUSH) == in qeth_check_outbound_queue()
4152 atomic_xchg(&queue->state, QETH_OUT_Q_LOCKED_FLUSH); in qeth_do_send_packet()
/linux-4.1.27/drivers/block/drbd/
Ddrbd_worker.c556 sect_in = atomic_xchg(&device->rs_sect_in, 0); in drbd_rs_number_requests()
/linux-4.1.27/drivers/scsi/
Dhptiop.c1085 if (atomic_xchg(&hba->resetting, 1) == 0) { in hptiop_reset_hba()
/linux-4.1.27/drivers/ata/
Dlibahci.c1799 status = atomic_xchg(&pp->intr_status, 0); in ahci_port_thread_fn()
/linux-4.1.27/drivers/net/ethernet/ti/
Dnetcp_ethss.c1816 if (atomic_xchg(&slave->link_state, link_state) != link_state) in netcp_ethss_update_link_state()
/linux-4.1.27/drivers/net/wireless/brcm80211/brcmfmac/
Dsdio.c2648 intstatus = atomic_xchg(&bus->intstatus, 0); in brcmf_sdio_dpc()
/linux-4.1.27/drivers/gpu/drm/i915/
Di915_gem.c1189 return !atomic_xchg(&file_priv->rps_wait_boost, true); in can_wait_boost()
/linux-4.1.27/drivers/gpu/drm/radeon/
Dr600.c4020 if (atomic_xchg(&rdev->ih.lock, 1)) in r600_irq_process()
Devergreen.c5006 if (atomic_xchg(&rdev->ih.lock, 1)) in evergreen_irq_process()
Dsi.c6446 if (atomic_xchg(&rdev->ih.lock, 1)) in si_irq_process()
Dcik.c7915 if (atomic_xchg(&rdev->ih.lock, 1)) in cik_irq_process()
/linux-4.1.27/net/core/
Ddev.c1657 int deferred = atomic_xchg(&netstamp_needed_deferred, 0); in net_enable_timestamp()
/linux-4.1.27/kernel/events/
Dcore.c3932 events = atomic_xchg(&rb->poll, 0); in perf_poll()
/linux-4.1.27/arch/x86/kvm/
Dx86.c6160 vcpu->arch.nmi_pending += atomic_xchg(&vcpu->arch.nmi_queued, 0); in process_nmi()