/Linux-v5.4/arch/riscv/include/asm/ |
D | atomic.h | 58 void atomic##prefix##_##op(c_type i, atomic##prefix##_t *v) \ 92 c_type atomic##prefix##_fetch_##op##_relaxed(c_type i, \ in ATOMIC_OPS() 93 atomic##prefix##_t *v) \ in ATOMIC_OPS() 104 c_type atomic##prefix##_fetch_##op(c_type i, atomic##prefix##_t *v) \ 117 c_type atomic##prefix##_##op##_return_relaxed(c_type i, \ 118 atomic##prefix##_t *v) \ 120 return atomic##prefix##_fetch_##op##_relaxed(i, v) c_op I; \ 123 c_type atomic##prefix##_##op##_return(c_type i, atomic##prefix##_t *v) \ 125 return atomic##prefix##_fetch_##op(i, v) c_op I; \ 249 c_t atomic##prefix##_xchg_relaxed(atomic##prefix##_t *v, c_t n) \ [all …]
|
/Linux-v5.4/scripts/atomic/ |
D | gen-atomic-long.sh | 6 . ${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}${atomic}_${name}(${argscast});
|
D | gen-atomics.sh | 11 gen-atomic-instrumented.sh asm-generic/atomic-instrumented.h 12 gen-atomic-long.sh asm-generic/atomic-long.h 13 gen-atomic-fallback.sh linux/atomic-fallback.h
|
D | gen-atomic-instrumented.sh | 6 . ${ATOMICDIR}/atomic-tbl.sh 39 local atomic="$1"; shift 45 local atomicname="arch_${atomic}_${pfx}${name}${sfx}${order}" 71 local atomic="$1"; shift 74 local atomicname="${atomic}_${pfx}${name}${sfx}${order}" 76 local guard="$(gen_guard "${meta}" "${atomic}" "${pfx}" "${name}" "${sfx}" "${order}")" 79 local params="$(gen_params "${int}" "${atomic}" "$@")" 136 * This file provides wrappers with KASAN instrumentation for atomic operations.
|
D | atomic-tbl.sh | 98 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}"
|
D | gen-atomic-fallback.sh | 6 . ${ATOMICDIR}/atomic-tbl.sh 17 local atomic="$1"; shift 20 local atomicname="${atomic}_${pfx}${name}${sfx}${order}" 24 local params="$(gen_params "${int}" "${atomic}" "$@")" 66 local atomic="$1" 68 local basename="${atomic}_${pfx}${name}${sfx}" 97 printf "#endif /* ${atomic}_${pfx}${name}${sfx} */\n\n"
|
/Linux-v5.4/lib/ |
D | dec_and_lock.c | 21 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()
|
D | atomic64_test.c | 22 atomic##bit##_set(&v, v0); \ 24 atomic##bit##_##op(val, &v); \ 26 WARN(atomic##bit##_read(&v) != r, "%Lx != %Lx\n", \ 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); \ [all …]
|
/Linux-v5.4/net/rds/ |
D | rdma.c | 792 || rm->atomic.op_active) in rds_cmsg_atomic() 800 rm->atomic.op_type = RDS_ATOMIC_TYPE_FADD; in rds_cmsg_atomic() 801 rm->atomic.op_m_fadd.add = args->fadd.add; in rds_cmsg_atomic() 802 rm->atomic.op_m_fadd.nocarry_mask = 0; in rds_cmsg_atomic() 805 rm->atomic.op_type = RDS_ATOMIC_TYPE_FADD; in rds_cmsg_atomic() 806 rm->atomic.op_m_fadd.add = args->m_fadd.add; in rds_cmsg_atomic() 807 rm->atomic.op_m_fadd.nocarry_mask = args->m_fadd.nocarry_mask; in rds_cmsg_atomic() 810 rm->atomic.op_type = RDS_ATOMIC_TYPE_CSWP; in rds_cmsg_atomic() 811 rm->atomic.op_m_cswp.compare = args->cswp.compare; in rds_cmsg_atomic() 812 rm->atomic.op_m_cswp.swap = args->cswp.swap; in rds_cmsg_atomic() [all …]
|
/Linux-v5.4/scripts/atomic/fallbacks/ |
D | fetch_add_unless | 3 * ${atomic}_fetch_add_unless - add unless the number is already a given value 4 * @v: pointer of type ${atomic}_t 12 ${atomic}_fetch_add_unless(${atomic}_t *v, ${int} a, ${int} u) 14 ${int} c = ${atomic}_read(v); 19 } while (!${atomic}_try_cmpxchg(v, &c, c + a));
|
D | dec_and_test | 3 * ${atomic}_dec_and_test - decrement and test 4 * @v: pointer of type ${atomic}_t 11 ${atomic}_dec_and_test(${atomic}_t *v) 13 return ${atomic}_dec_return(v) == 0;
|
D | inc_and_test | 3 * ${atomic}_inc_and_test - increment and test 4 * @v: pointer of type ${atomic}_t 11 ${atomic}_inc_and_test(${atomic}_t *v) 13 return ${atomic}_inc_return(v) == 0;
|
D | inc_not_zero | 3 * ${atomic}_inc_not_zero - increment unless the number is zero 4 * @v: pointer of type ${atomic}_t 10 ${atomic}_inc_not_zero(${atomic}_t *v) 12 return ${atomic}_add_unless(v, 1, 0);
|
D | sub_and_test | 3 * ${atomic}_sub_and_test - subtract value from variable and test result 5 * @v: pointer of type ${atomic}_t 12 ${atomic}_sub_and_test(${int} i, ${atomic}_t *v) 14 return ${atomic}_sub_return(i, v) == 0;
|
D | add_negative | 3 * ${atomic}_add_negative - add and test if negative 5 * @v: pointer of type ${atomic}_t 12 ${atomic}_add_negative(${int} i, ${atomic}_t *v) 14 return ${atomic}_add_return(i, v) < 0;
|
D | add_unless | 3 * ${atomic}_add_unless - add unless the number is already a given value 4 * @v: pointer of type ${atomic}_t 12 ${atomic}_add_unless(${atomic}_t *v, ${int} a, ${int} u) 14 return ${atomic}_fetch_add_unless(v, a, u) != u;
|
D | dec_unless_positive | 3 ${atomic}_dec_unless_positive(${atomic}_t *v) 5 ${int} c = ${atomic}_read(v); 10 } while (!${atomic}_try_cmpxchg(v, &c, c - 1));
|
D | inc_unless_negative | 3 ${atomic}_inc_unless_negative(${atomic}_t *v) 5 ${int} c = ${atomic}_read(v); 10 } while (!${atomic}_try_cmpxchg(v, &c, c + 1));
|
D | dec_if_positive | 3 ${atomic}_dec_if_positive(${atomic}_t *v) 5 ${int} dec, c = ${atomic}_read(v); 11 } while (!${atomic}_try_cmpxchg(v, &c, dec));
|
D | dec | 3 ${atomic}_${pfx}dec${sfx}${order}(${atomic}_t *v) 5 ${retstmt}${atomic}_${pfx}sub${sfx}${order}(1, v);
|
D | inc | 3 ${atomic}_${pfx}inc${sfx}${order}(${atomic}_t *v) 5 ${retstmt}${atomic}_${pfx}add${sfx}${order}(1, v);
|
/Linux-v5.4/Documentation/ |
D | atomic_bitops.txt | 5 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: 69 Since a platform only has a single means of achieving atomic operations
|
/Linux-v5.4/sound/synth/emux/ |
D | emux_oss.c | 27 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 361 fake_event(emu, port, voice, MIDI_CTL_ALL_NOTES_OFF, 0, atomic, hop); in emuspec_control() [all …]
|
/Linux-v5.4/Documentation/core-api/ |
D | atomic_ops.rst | 8 maintainers on how to implement atomic counter, bitops, and spinlock 41 The initializer is atomic in that the return values of the atomic operations 62 The setting is atomic in that the return values of the atomic operations by 73 The read is atomic in that the return value is guaranteed to be one of the 180 locks, or atomic operations if variable a can change at runtime! 186 Now, we move onto the atomic operation interfaces typically implemented with 215 and after the atomic operation calls are strongly ordered with respect 216 to the atomic operation itself. 219 before and after the atomic operation. 221 If the atomic instructions used in an implementation provide explicit [all …]
|
/Linux-v5.4/sound/core/seq/ |
D | seq_queue.c | 237 void snd_seq_check_queue(struct snd_seq_queue *q, int atomic, int hop) in snd_seq_check_queue() argument 262 snd_seq_dispatch_event(cell, atomic, hop); in snd_seq_check_queue() 270 snd_seq_dispatch_event(cell, atomic, hop); in snd_seq_check_queue() 286 int snd_seq_enqueue_event(struct snd_seq_event_cell *cell, int atomic, int hop) in snd_seq_enqueue_event() argument 330 snd_seq_check_queue(q, atomic, hop); in snd_seq_enqueue_event() 633 int atomic, int hop) in queue_broadcast_event() argument 648 snd_seq_kernel_client_dispatch(SNDRV_SEQ_CLIENT_SYSTEM, &sev, atomic, hop); in queue_broadcast_event() 657 int atomic, int hop) in snd_seq_queue_process_event() argument 664 queue_broadcast_event(q, ev, atomic, hop); in snd_seq_queue_process_event() 669 queue_broadcast_event(q, ev, atomic, hop); in snd_seq_queue_process_event() [all …]
|