Home
last modified time | relevance | path

Searched refs:atomic_add_unless (Results 1 – 25 of 92) sorted by relevance

1234

/linux-6.6.21/lib/
Ddec_and_lock.c24 if (atomic_add_unless(atomic, -1, 1)) in _atomic_dec_and_lock()
41 if (atomic_add_unless(atomic, -1, 1)) in _atomic_dec_and_lock_irqsave()
56 if (atomic_add_unless(atomic, -1, 1)) in _atomic_dec_and_raw_lock()
72 if (atomic_add_unless(atomic, -1, 1)) in _atomic_dec_and_raw_lock_irqsave()
/linux-6.6.21/Documentation/translations/zh_CN/core-api/
Drefcount-vs-atomic.rst137 * ``atomic_add_unless(&var, -1, 1)`` --> ``refcount_dec_not_one(&var)``
143 .. note:: atomic_add_unless()只在执行成功时提供完整的顺序。
/linux-6.6.21/scripts/coccinelle/api/
Datomic_as_refcounter.cocci100 atomic_add_unless(&(a)->x,-1,1)@p1
110 msg = "WARNING: atomic_add_unless"
/linux-6.6.21/Documentation/litmus-tests/atomic/
DAtomic-RMW-ops-are-atomic-WRT-atomic_set.litmus16 (void)atomic_add_unless(v, 1, 0);
/linux-6.6.21/drivers/gpu/drm/i915/gt/
Dintel_timeline.c195 if (atomic_add_unless(&tl->pin_count, 1, 0)) in intel_timeline_pin()
258 if (atomic_add_unless(&tl->active_count, 1, 0)) in intel_timeline_enter()
283 if (atomic_add_unless(&tl->active_count, -1, 1)) in intel_timeline_exit()
Dintel_context.h196 while (!atomic_add_unless(&ce->pin_count, -1, 1)) { in intel_context_unpin()
/linux-6.6.21/drivers/gpu/drm/msm/disp/dpu1/
Ddpu_encoder_phys_cmd.c94 new_cnt = atomic_add_unless(&phys_enc->pending_kickoff_cnt, -1, 0); in dpu_encoder_phys_cmd_pp_tx_done_irq()
124 atomic_add_unless(&cmd_enc->pending_vblank_cnt, -1, 0); in dpu_encoder_phys_cmd_te_rd_ptr_irq()
135 atomic_add_unless(&phys_enc->pending_ctlstart_cnt, -1, 0); in dpu_encoder_phys_cmd_ctl_start_irq()
207 atomic_add_unless(&phys_enc->pending_kickoff_cnt, -1, 0); in _dpu_encoder_phys_cmd_handle_ppdone_timeout()
Ddpu_encoder_phys_wb.c364 atomic_add_unless(&phys_enc->pending_kickoff_cnt, -1, 0); in _dpu_encoder_phys_wb_frame_done_helper()
423 atomic_add_unless(&phys_enc->pending_kickoff_cnt, -1, 0); in _dpu_encoder_phys_wb_handle_wbdone_timeout()
/linux-6.6.21/Documentation/
Datomic_t.txt44 atomic_add_unless(), atomic_inc_not_zero()
99 (void)atomic_add_unless(v, 1, 0);
111 before the atomic_add_unless(), in which case that latter one would no-op, or
123 atomic_add_unless(v, 1, 0);
/linux-6.6.21/drivers/net/wireguard/
Dqueueing.c74 if (!atomic_add_unless(&queue->count, 1, MAX_QUEUED_PACKETS)) in wg_prev_queue_enqueue()
/linux-6.6.21/drivers/crypto/
Datmel-sha204a.c45 if (!atomic_add_unless(&i2c_priv->tfm_count, 1, 1)) in atmel_sha204a_rng_read_nonblocking()
/linux-6.6.21/drivers/gpu/drm/i915/
Dintel_wakeref.h153 if (unlikely(!atomic_add_unless(&wf->count, -1, 1))) in __intel_wakeref_put()
Dintel_wakeref.c90 if (atomic_add_unless(&wf->count, -1, 1)) in __intel_wakeref_put_work()
Di915_active.c182 if (atomic_add_unless(&ref->count, -1, 1)) in active_work()
192 if (atomic_add_unless(&ref->count, -1, 1)) in active_retire()
492 return atomic_add_unless(&ref->count, 1, 0); in i915_active_acquire_if_busy()
/linux-6.6.21/Documentation/core-api/
Drefcount-vs-atomic.rst148 * ``atomic_add_unless(&var, -1, 1)`` --> ``refcount_dec_not_one(&var)``
154 .. note:: atomic_add_unless() only provides full order on success.
/linux-6.6.21/drivers/gpu/drm/i915/gem/
Di915_gem_shrinker.c484 if (atomic_add_unless(&obj->mm.shrink_pin, 1, 0)) in i915_gem_object_make_unshrinkable()
506 if (atomic_add_unless(&obj->mm.shrink_pin, -1, 1)) in ___i915_gem_object_make_shrinkable()
/linux-6.6.21/net/batman-adv/
Dmain.h290 #define batadv_atomic_dec_not_zero(v) atomic_add_unless((v), -1, 0)
/linux-6.6.21/drivers/infiniband/hw/vmw_pvrdma/
Dpvrdma_verbs.c442 if (!atomic_add_unless(&dev->num_pds, 1, dev->dsr->caps.max_pd)) in pvrdma_alloc_pd()
529 if (!atomic_add_unless(&dev->num_ahs, 1, dev->dsr->caps.max_ah)) in pvrdma_create_ah()
Dpvrdma_srq.c134 if (!atomic_add_unless(&dev->num_srqs, 1, dev->dsr->caps.max_srq)) in pvrdma_create_srq()
/linux-6.6.21/include/linux/
Dpage_ref.h238 bool ret = atomic_add_unless(&page->_refcount, nr, u); in page_ref_add_unless()
Dpm_runtime.h140 atomic_add_unless(&dev->power.usage_count, -1, 0); in pm_runtime_put_noidle()
/linux-6.6.21/arch/sh/kernel/
Dperf_event.c65 if (!atomic_add_unless(&num_events, -1, 1)) { in hw_perf_event_destroy()
/linux-6.6.21/arch/x86/platform/uv/
Duv_nmi.c498 int first = atomic_add_unless(&hub_nmi->in_nmi, 1, 1); in uv_set_in_nmi()
502 if (atomic_add_unless(&uv_in_nmi, 1, 1)) in uv_set_in_nmi()
/linux-6.6.21/drivers/phy/ti/
Dphy-twl4030-usb.c591 if (atomic_add_unless(&twl->connected, 1, 1)) { in twl4030_usb_irq()
598 if (atomic_add_unless(&twl->connected, -1, 0)) { in twl4030_usb_irq()
/linux-6.6.21/drivers/iio/common/hid-sensors/
Dhid-sensor-trigger.c158 if (atomic_add_unless(&st->runtime_pm_enable, 1, 1)) in hid_sensor_power_state()

1234