Home
last modified time | relevance | path

Searched refs:atomic (Results 1 – 25 of 342) sorted by relevance

12345678910>>...14

/linux-6.3-rc2/lib/
A Ddec_and_lock.c21 int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock) in _atomic_dec_and_lock() argument
24 if (atomic_add_unless(atomic, -1, 1)) in _atomic_dec_and_lock()
29 if (atomic_dec_and_test(atomic)) in _atomic_dec_and_lock()
37 int _atomic_dec_and_lock_irqsave(atomic_t *atomic, spinlock_t *lock, in _atomic_dec_and_lock_irqsave() argument
41 if (atomic_add_unless(atomic, -1, 1)) in _atomic_dec_and_lock_irqsave()
46 if (atomic_dec_and_test(atomic)) in _atomic_dec_and_lock_irqsave()
53 int _atomic_dec_and_raw_lock(atomic_t *atomic, raw_spinlock_t *lock) in _atomic_dec_and_raw_lock() argument
56 if (atomic_add_unless(atomic, -1, 1)) in _atomic_dec_and_raw_lock()
61 if (atomic_dec_and_test(atomic)) in _atomic_dec_and_raw_lock()
72 if (atomic_add_unless(atomic, -1, 1)) in _atomic_dec_and_raw_lock_irqsave()
[all …]
A Datomic64_test.c22 atomic##bit##_set(&v, v0); \
24 atomic##bit##_##op(val, &v); \
27 (unsigned long long)atomic##bit##_read(&v), \
46 atomic##bit##_set(&v, v0); \
49 BUG_ON(atomic##bit##_##op(val, &v) != r); \
50 BUG_ON(atomic##bit##_read(&v) != r); \
55 atomic##bit##_set(&v, v0); \
58 BUG_ON(atomic##bit##_##op(val, &v) != v0); \
59 BUG_ON(atomic##bit##_read(&v) != r); \
74 atomic##bit##_set(&v, init); \
[all …]
/linux-6.3-rc2/scripts/atomic/
A Dgen-atomics.sh11 gen-atomic-instrumented.sh linux/atomic/atomic-instrumented.h
12 gen-atomic-long.sh linux/atomic/atomic-long.h
13 gen-atomic-fallback.sh linux/atomic/atomic-arch-fallback.h
A Dgen-atomic-long.sh6 . ${ATOMICDIR}/atomic-tbl.sh
13 local atomic="$1"; shift
17 printf "($(gen_param_type "${arg}" "${int}" "${atomic}"))"
24 local atomic="$1"; shift
27 local cast="$(gen_cast "$1" "${int}" "${atomic}")"
40 local atomic="$1"; shift
45 local argscast="$(gen_args_cast "${int}" "${atomic}" "$@")"
52 ${retstmt}arch_${atomic}_${name}(${argscast});
A Datomic-tbl.sh98 local atomic="$1"; shift
103 v) type="${atomic}_t *";;
104 cv) type="const ${atomic}_t *";;
115 local atomic="$1"; shift
117 local type="$(gen_param_type "${arg}" "${int}" "${atomic}")"
126 local atomic="$1"; shift
129 gen_param "$1" "${int}" "${atomic}"
A Dgen-atomic-fallback.sh6 . ${ATOMICDIR}/atomic-tbl.sh
17 local atomic="$1"; shift
20 local atomicname="arch_${atomic}_${pfx}${name}${sfx}${order}"
24 local params="$(gen_params "${int}" "${atomic}" "$@")"
66 local atomic="$1"
68 local basename="arch_${atomic}_${pfx}${name}${sfx}"
80 local atomic="$1"
82 local basename="arch_${atomic}_${pfx}${name}${sfx}"
/linux-6.3-rc2/net/rds/
A Drdma.c873 || rm->atomic.op_active) in rds_cmsg_atomic()
883 rm->atomic.op_m_fadd.nocarry_mask = 0; in rds_cmsg_atomic()
895 rm->atomic.op_m_cswp.swap_mask = ~0; in rds_cmsg_atomic()
910 rm->atomic.op_active = 1; in rds_cmsg_atomic()
913 if (IS_ERR(rm->atomic.op_sg)) { in rds_cmsg_atomic()
914 ret = PTR_ERR(rm->atomic.op_sg); in rds_cmsg_atomic()
931 if (rm->atomic.op_notify || rm->atomic.op_recverr) { in rds_cmsg_atomic()
937 rm->atomic.op_notifier = kmalloc(sizeof(*rm->atomic.op_notifier), GFP_KERNEL); in rds_cmsg_atomic()
938 if (!rm->atomic.op_notifier) { in rds_cmsg_atomic()
954 rm->atomic.op_active = 0; in rds_cmsg_atomic()
[all …]
/linux-6.3-rc2/Documentation/
A Datomic_bitops.txt5 While our bitmap_{}() functions are non-atomic, we have a number of operations
6 operating on single bits in a bitmap that are atomic.
18 RMW atomic operations without return value:
23 RMW atomic operations with return value:
33 All RMW atomic operations have a '__' prefixed variant which is non-atomic.
39 Non-atomic ops:
67 Since a platform only has a single means of achieving atomic operations
/linux-6.3-rc2/scripts/atomic/fallbacks/
A Dfetch_add_unless3 * arch_${atomic}_fetch_add_unless - add unless the number is already a given value
4 * @v: pointer of type ${atomic}_t
12 arch_${atomic}_fetch_add_unless(${atomic}_t *v, ${int} a, ${int} u)
14 ${int} c = arch_${atomic}_read(v);
19 } while (!arch_${atomic}_try_cmpxchg(v, &c, c + a));
A Dinc_and_test3 * arch_${atomic}_inc_and_test - increment and test
4 * @v: pointer of type ${atomic}_t
11 arch_${atomic}_inc_and_test(${atomic}_t *v)
13 return arch_${atomic}_inc_return(v) == 0;
A Ddec_and_test3 * arch_${atomic}_dec_and_test - decrement and test
4 * @v: pointer of type ${atomic}_t
11 arch_${atomic}_dec_and_test(${atomic}_t *v)
13 return arch_${atomic}_dec_return(v) == 0;
A Dinc_not_zero3 * arch_${atomic}_inc_not_zero - increment unless the number is zero
4 * @v: pointer of type ${atomic}_t
10 arch_${atomic}_inc_not_zero(${atomic}_t *v)
12 return arch_${atomic}_add_unless(v, 1, 0);
A Dsub_and_test3 * arch_${atomic}_sub_and_test - subtract value from variable and test result
5 * @v: pointer of type ${atomic}_t
12 arch_${atomic}_sub_and_test(${int} i, ${atomic}_t *v)
14 return arch_${atomic}_sub_return(i, v) == 0;
A Dadd_negative3 * arch_${atomic}_add_negative - add and test if negative
5 * @v: pointer of type ${atomic}_t
12 arch_${atomic}_add_negative(${int} i, ${atomic}_t *v)
14 return arch_${atomic}_add_return(i, v) < 0;
A Dadd_unless3 * arch_${atomic}_add_unless - add unless the number is already a given value
4 * @v: pointer of type ${atomic}_t
12 arch_${atomic}_add_unless(${atomic}_t *v, ${int} a, ${int} u)
14 return arch_${atomic}_fetch_add_unless(v, a, u) != u;
A Dset_release3 arch_${atomic}_set_release(${atomic}_t *v, ${int} i)
5 if (__native_word(${atomic}_t)) {
9 arch_${atomic}_set(v, i);
A Dread_acquire3 arch_${atomic}_read_acquire(const ${atomic}_t *v)
7 if (__native_word(${atomic}_t)) {
10 ret = arch_${atomic}_read(v);
A Dinc_unless_negative3 arch_${atomic}_inc_unless_negative(${atomic}_t *v)
5 ${int} c = arch_${atomic}_read(v);
10 } while (!arch_${atomic}_try_cmpxchg(v, &c, c + 1));
A Ddec_unless_positive3 arch_${atomic}_dec_unless_positive(${atomic}_t *v)
5 ${int} c = arch_${atomic}_read(v);
10 } while (!arch_${atomic}_try_cmpxchg(v, &c, c - 1));
A Ddec_if_positive3 arch_${atomic}_dec_if_positive(${atomic}_t *v)
5 ${int} dec, c = arch_${atomic}_read(v);
11 } while (!arch_${atomic}_try_cmpxchg(v, &c, dec));
/linux-6.3-rc2/
A DKbuild46 # Check the manual modification of atomic headers
61 atomic-checks += $(addprefix $(obj)/.checked-, \
62 atomic-arch-fallback.h \
63 atomic-instrumented.h \
64 atomic-long.h)
66 targets += $(atomic-checks)
67 $(atomic-checks): $(obj)/.checked-%: include/linux/atomic/% FORCE
73 prepare: $(offsets-file) missing-syscalls $(atomic-checks)
/linux-6.3-rc2/include/linux/
A Dspinlock.h470 extern int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock);
471 #define atomic_dec_and_lock(atomic, lock) \ argument
472 __cond_lock(lock, _atomic_dec_and_lock(atomic, lock))
474 extern int _atomic_dec_and_lock_irqsave(atomic_t *atomic, spinlock_t *lock,
476 #define atomic_dec_and_lock_irqsave(atomic, lock, flags) \ argument
477 __cond_lock(lock, _atomic_dec_and_lock_irqsave(atomic, lock, &(flags)))
479 extern int _atomic_dec_and_raw_lock(atomic_t *atomic, raw_spinlock_t *lock);
480 #define atomic_dec_and_raw_lock(atomic, lock) \ argument
481 __cond_lock(lock, _atomic_dec_and_raw_lock(atomic, lock))
485 #define atomic_dec_and_raw_lock_irqsave(atomic, lock, flags) \ argument
[all …]
/linux-6.3-rc2/sound/synth/emux/
A Demux_oss.c27 void *private, int atomic, int hop);
30 int cmd, unsigned char *event, int atomic, int hop);
32 int cmd, unsigned char *event, int atomic, int hop);
34 int ch, int param, int val, int atomic, int hop);
288 int atomic, int hop) in snd_emux_event_oss_input() argument
301 return snd_emux_event_input(ev, direct, private_data, atomic, hop); in snd_emux_event_oss_input()
309 emuspec_control(emu, p, cmd, data, atomic, hop); in snd_emux_event_oss_input()
311 gusspec_control(emu, p, cmd, data, atomic, hop); in snd_emux_event_oss_input()
321 unsigned char *event, int atomic, int hop) in emuspec_control() argument
416 unsigned char *event, int atomic, int hop) in gusspec_control() argument
[all …]
/linux-6.3-rc2/arch/riscv/include/asm/
A Datomic.h56 void arch_atomic##prefix##_##op(c_type i, atomic##prefix##_t *v) \
91 atomic##prefix##_t *v) \ in ATOMIC_OPS()
102 c_type arch_atomic##prefix##_fetch_##op(c_type i, atomic##prefix##_t *v) \
116 atomic##prefix##_t *v) \
247 c_t arch_atomic##prefix##_xchg_relaxed(atomic##prefix##_t *v, c_t n) \
252 c_t arch_atomic##prefix##_xchg_acquire(atomic##prefix##_t *v, c_t n) \
257 c_t arch_atomic##prefix##_xchg_release(atomic##prefix##_t *v, c_t n) \
262 c_t arch_atomic##prefix##_xchg(atomic##prefix##_t *v, c_t n) \
267 c_t arch_atomic##prefix##_cmpxchg_relaxed(atomic##prefix##_t *v, \
273 c_t arch_atomic##prefix##_cmpxchg_acquire(atomic##prefix##_t *v, \
[all …]
/linux-6.3-rc2/sound/core/seq/
A Dseq_queue.c268 snd_seq_dispatch_event(cell, atomic, hop); in snd_seq_check_queue()
279 snd_seq_dispatch_event(cell, atomic, hop); in snd_seq_check_queue()
344 snd_seq_check_queue(q, atomic, hop); in snd_seq_enqueue_event()
630 int atomic, int hop) in queue_broadcast_event() argument
654 int atomic, int hop) in snd_seq_queue_process_event() argument
661 queue_broadcast_event(q, ev, atomic, hop); in snd_seq_queue_process_event()
666 queue_broadcast_event(q, ev, atomic, hop); in snd_seq_queue_process_event()
671 queue_broadcast_event(q, ev, atomic, hop); in snd_seq_queue_process_event()
676 queue_broadcast_event(q, ev, atomic, hop); in snd_seq_queue_process_event()
681 queue_broadcast_event(q, ev, atomic, hop); in snd_seq_queue_process_event()
[all …]

Completed in 28 milliseconds

12345678910>>...14