| /linux/rust/kernel/sync/ |
| H A D | atomic.rs | 3 //! Atomic primitives. 13 //! - A normal write from C side is treated as an atomic write if 15 //! - Mixed-size atomic accesses don't cause data races. 37 /// The atomic operations are implemented in a way that is fully compatible with the [Linux Kernel 39 /// [`LKMM`][LKMM] atomic primitives. With the help of [`Atomic::from_ptr()`] and 40 /// [`Atomic::as_ptr()`], this provides a way to interact with [C-side atomic operations] 41 /// (including those without the `atomic` prefix, e.g. `READ_ONCE()`, `WRITE_ONCE()`, 50 /// [C-side atomic operation 52 pub struct Atomic<T: AtomicType>(AtomicRepr<T::Repr>); global() struct 55 unsafe impl<T: AtomicType> Sync for Atomic<T> {} global() implementation 145 impl<T: AtomicType> Atomic<T> { global() implementation 248 impl<T: AtomicType> Atomic<T> global() implementation 311 impl<T: AtomicType + core::fmt::Debug> core::fmt::Debug for Atomic<T> global() implementation 320 impl<T: AtomicType> Atomic<T> global() implementation 486 impl<T: AtomicType> Atomic<T> global() implementation [all...] |
| H A D | refcount.rs | 3 //! Atomic reference counting. 9 sync::atomic::Atomic, 13 /// Atomic reference counter. 15 /// This type is conceptually an atomic integer, but provides saturation semantics compared to 16 /// normal atomic integers. Values in the negative range when viewed as a signed integer are 41 /// Get the underlying atomic counter that backs the refcount. 47 pub fn as_atomic(&self) -> &Atomic<i32> { in as_atomic() 49 // SAFETY: `refcount_t` is a transparent wrapper of `atomic_t`, which is an atomic 32-bit in as_atomic() 50 // integer that is layout-wise compatible with `Atomic<i3 in as_atomic() [all...] |
| /linux/arch/mips/include/asm/octeon/ |
| H A D | cvmx-fau.h | 123 * @reg: FAU atomic register to access. 0 <= reg < 2048. 127 * Returns Address to store for atomic update 139 * @tagwait: Should the atomic add wait for the current tag switch 143 * @reg: FAU atomic register to access. 0 <= reg < 2048. 150 * Returns Address to read from for atomic update 162 * Perform an atomic 64 bit add 164 * @reg: FAU atomic register to access. 0 <= reg < 2048. 177 * Perform an atomic 32 bit add 179 * @reg: FAU atomic register to access. 0 <= reg < 2048. 193 * Perform an atomic 16 bit add [all …]
|
| /linux/scripts/atomic/ |
| H A D | gen-atomics.sh | 4 # Generate atomic headers 11 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 14 gen-rust-atomic-helpers.sh ../rust/helpers/atomic.c
|
| H A D | atomic-tbl.sh | 112 # gen_param_type(arg, int, atomic) 117 local atomic="$1"; shift 122 v) type="${atomic}_t *";; 123 cv) type="const ${atomic}_t *";; 129 #gen_param(arg, int, atomic) 134 local atomic="$1"; shift 136 local type="$(gen_param_type "${arg}" "${int}" "${atomic}")" 141 #gen_params(int, atomic, arg...) 145 local atomic="$1"; shift 148 gen_param "$1" "${int}" "${atomic}" [all …]
|
| H A D | gen-rust-atomic-helpers.sh | 6 . ${ATOMICDIR}/atomic-tbl.sh 8 #gen_proto_order_variant(meta, pfx, name, sfx, order, atomic, int, arg...) 16 local atomic="$1"; shift 19 local atomicname="${atomic}_${pfx}${name}${sfx}${order}" 22 local params="$(gen_params "${int}" "${atomic}" "$@")" 43 * This file provides helpers for the various atomic functions for Rust. 48 #include <linux/atomic.h> 53 gen_proto "${meta}" "${name}" "atomic" "int" ${args}
|
| H A D | gen-atomic-long.sh | 6 . ${ATOMICDIR}/atomic-tbl.sh 8 #gen_cast(arg, int, atomic) 13 local atomic="$1"; shift 17 printf "($(gen_param_type "${arg}" "${int}" "${atomic}"))" 20 #gen_args_cast(int, atomic, arg...) 24 local atomic="$1"; shift 27 local cast="$(gen_cast "$1" "${int}" "${atomic}")" 48 local argscast_32="$(gen_args_cast "int" "atomic" "$@")"
|
| H A D | gen-atomic-fallback.sh | 6 . ${ATOMICDIR}/atomic-tbl.sh 8 #gen_template_fallback(template, meta, pfx, name, sfx, order, atomic, int, args...) 17 local atomic="$1"; shift 22 local params="$(gen_params "${int}" "${atomic}" "$@")" 28 #gen_order_fallback(meta, pfx, name, sfx, order, atomic, int, args...) 42 #gen_proto_fallback(meta, pfx, name, sfx, order, atomic, int, args...) 55 #gen_proto_order_variant(meta, pfx, name, sfx, order, atomic, int, args...) 63 local atomic="$1"; shift 66 local atomicname="${atomic}_${pfx}${name}${sfx}${order}" 67 local basename="${atomic}_${pfx}${name}${sfx}" [all …]
|
| /linux/drivers/firmware/arm_scmi/transports/ |
| H A D | Kconfig | 52 bool "Enable atomic mode support for SCMI SMC transport" 55 Enable support of atomic operation for SCMI SMC based transport. 57 If you want the SCMI SMC based transport to operate in atomic 60 Enabling atomic mode operations allows any SCMI driver using this 61 transport to optionally ask for atomic SCMI transactions and operate 62 in atomic context too, at the price of using a number of busy-waiting 109 bool "Enable atomic mode for SCMI VirtIO transport" 112 Enable support of atomic operation for SCMI VirtIO based transport. 114 If you want the SCMI VirtIO based transport to operate in atomic 118 Enabling atomic mode operations allows any SCMI driver using this [all …]
|
| /linux/Documentation/ |
| H A D | atomic_bitops.txt | 2 Atomic bitops 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: 67 Since a platform only has a single means of achieving atomic operations
|
| H A D | atomic_t.txt | 2 On atomic types (atomic_t atomic64_t and atomic_long_t). 4 The atomic type provides an interface to the architecture's means of atomic 5 RMW operations between CPUs (atomic operations on MMIO are not supported and 20 RMW atomic operations: 67 Therefore, an explicitly unsigned variant of the atomic ops is strictly 91 C Atomic-RMW-ops-are-atomic-WRT-atomic_set 118 The obvious case where this is not so is when we need to implement atomic ops 155 All these operations are SMP atomic; that is, the operations (for a single 156 atomic variable) can be fully ordered and no intermediate state is lost or 192 only apply to the RMW atomic ops and can be used to augment/upgrade the [all …]
|
| /linux/rust/kernel/sync/atomic/ |
| H A D | internal.rs | 3 //! Atomic internal implementations. 5 //! Provides 1:1 mapping to the C atomic operations. 16 /// Sealed trait marker to disable customized impls on atomic implementation traits. 20 // The C side supports atomic primitives only for `i32` and `i64` (`atomic_t` and `atomic64_t`), 21 // while the Rust side also provides atomic support for `i8`, `i16` and `*const c_void` on top of 29 /// A marker trait for types that implement atomic operations with C side primitives. 41 /// [`Self`], but it may be different for the atomic pointer type. 45 // The current helpers of load/store of atomic `i8`, `i16` and pointers use `{WRITE,READ}_ONCE()` 47 // supports native atomic RmW. 54 "The current implementation of atomic i in new() [all...] |
| /linux/include/linux/ |
| H A D | atomic.h | 2 /* Atomic operations usable in machine independent code */ 7 #include <asm/atomic.h> 11 * Relaxed variants of xchg, cmpxchg and some atomic operations. 80 #include <linux/atomic/atomic-arch-fallback.h> 81 #include <linux/atomic/atomic-long.h> 82 #include <linux/atomic/atomic-instrumented.h>
|
| H A D | mailbox_client.h | 24 * @rx_callback: Atomic callback to provide client the data received 25 * @tx_prepare: Atomic callback to ask client to prepare the payload 27 * @tx_done: Atomic callback to tell client of data transmission 46 void mbox_client_txdone(struct mbox_chan *chan, int r); /* atomic */ 47 bool mbox_client_peek_data(struct mbox_chan *chan); /* atomic */ 48 unsigned int mbox_chan_tx_slots_available(struct mbox_chan *chan); /* atomic */
|
| H A D | async.h | 50 * Note: This function may be called from atomic or non-atomic contexts. 66 * Note: This function may be called from atomic or non-atomic contexts. 85 * Note: This function may be called from atomic or non-atomic contexts. 108 * Note: This function may be called from atomic or non-atomic contexts.
|
| /linux/drivers/gpu/drm/i915/ |
| H A D | i915_wait_util.h | 52 * On PREEMPT_RT the context isn't becoming atomic because it is used in an 57 # define _WAIT_FOR_ATOMIC_CHECK(ATOMIC) WARN_ON_ONCE((ATOMIC) && !in_atomic()) argument 59 # define _WAIT_FOR_ATOMIC_CHECK(ATOMIC) do { } while (0) argument 62 #define _wait_for_atomic(COND, US, ATOMIC) \ argument 66 _WAIT_FOR_ATOMIC_CHECK(ATOMIC); \ 67 if (!(ATOMIC)) { \ 74 if (!(ATOMIC)) \ 87 if (!(ATOMIC)) { \
|
| /linux/include/asm-generic/bitops/ |
| H A D | instrumented-non-atomic.h | 4 * This file provides wrappers with sanitizer instrumentation for non-atomic 21 * Unlike set_bit(), this function is non-atomic. If it is called on the same 37 * Unlike clear_bit(), this function is non-atomic. If it is called on the same 53 * Unlike change_bit(), this function is non-atomic. If it is called on the same 68 * We treat non-atomic read-write bitops a little more special. in __instrument_read_write_bitop() 72 * assume-plain-writes-atomic rule): in __instrument_read_write_bitop() 75 * races with unmarked readers -> check "atomic" write. in __instrument_read_write_bitop() 93 * This operation is non-atomic. If two instances of this operation race, one 108 * This operation is non-atomic. If two instances of this operation race, one 123 * This operation is non-atomic. If two instances of this operation race, one
|
| /linux/Documentation/core-api/ |
| H A D | local_ops.rst | 5 Semantics and Behavior of Local Atomic Operations 11 This document explains the purpose of the local atomic operations, how 26 Purpose of local atomic operations 29 Local atomic operations are meant to provide fast and highly reentrant per CPU 30 counters. They minimize the performance cost of standard atomic operations by 34 Having fast per CPU atomic counters is interesting in many cases: it does not 39 Local atomic operations only guarantee variable modification atomicity wrt the 50 It can be done by slightly modifying the standard atomic operations: only 63 Rules to follow when using local atomic operations 82 "``long``", aligned, variables are always atomic. Since no memory [all …]
|
| /linux/net/rds/ |
| H A D | rdma.c | 898 * Fill in rds_message for an atomic request. 908 || rm->atomic.op_active) in rds_cmsg_atomic() 916 rm->atomic.op_type = RDS_ATOMIC_TYPE_FADD; in rds_cmsg_atomic() 917 rm->atomic.op_m_fadd.add = args->fadd.add; in rds_cmsg_atomic() 918 rm->atomic.op_m_fadd.nocarry_mask = 0; in rds_cmsg_atomic() 921 rm->atomic.op_type = RDS_ATOMIC_TYPE_FADD; in rds_cmsg_atomic() 922 rm->atomic.op_m_fadd.add = args->m_fadd.add; in rds_cmsg_atomic() 923 rm->atomic.op_m_fadd.nocarry_mask = args->m_fadd.nocarry_mask; in rds_cmsg_atomic() 926 rm->atomic.op_type = RDS_ATOMIC_TYPE_CSWP; in rds_cmsg_atomic() 927 rm->atomic.op_m_cswp.compare = args->cswp.compare; in rds_cmsg_atomic() [all …]
|
| /linux/Documentation/litmus-tests/ |
| H A D | README | 12 atomic (/atomic directory) 15 Atomic-RMW+mb__after_atomic-is-stronger-than-acquire.litmus 16 Test that an atomic RMW followed by a smp_mb__after_atomic() is 20 Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus 21 Test that atomic_set() cannot break the atomicity of atomic RMWs.
|
| /linux/arch/sh/include/asm/ |
| H A D | atomic.h | 7 #include <asm-generic/atomic.h> 12 * Atomic operations that C can't guarantee us. Useful for 26 #include <asm/atomic-grb.h> 28 #include <asm/atomic-llsc.h> 30 #include <asm/atomic-irq.h>
|
| /linux/Documentation/arch/xtensa/ |
| H A D | atomctl.rst | 2 Atomic Operation Control (ATOMCTL) Register 5 We Have Atomic Operation Control (ATOMCTL) Register. 10 can do Atomic Transactions to the memory internally. 13 can do Atomic Transactions itself. 21 Memory controller we let it to the atomic operations internally while 31 don't support atomic RCW memory transactions and will likely want to
|
| /linux/tools/testing/selftests/futex/include/ |
| H A D | atomic.h | 7 * GCC atomic builtin wrappers 8 * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html 28 * atomic_cmpxchg() - Atomic compare and exchange 42 * atomic_inc() - Atomic incrememnt 54 * atomic_dec() - Atomic decrement 66 * atomic_set() - Atomic set
|
| /linux/sound/synth/emux/ |
| H A 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); 290 int atomic, int hop) in snd_emux_event_oss_input() argument 303 return snd_emux_event_input(ev, direct, private_data, atomic, hop); in snd_emux_event_oss_input() 311 emuspec_control(emu, p, cmd, data, atomic, hop); in snd_emux_event_oss_input() 313 gusspec_control(emu, p, cmd, data, atomic, hop); in snd_emux_event_oss_input() 323 unsigned char *event, int atomic, int hop) in emuspec_control() argument 363 fake_event(emu, port, voice, MIDI_CTL_ALL_NOTES_OFF, 0, atomic, hop); in emuspec_control() [all …]
|
| /linux/drivers/misc/sgi-gru/ |
| H A D | grufault.c | 139 * the GRU, atomic operations must be used to clear bits. 169 * Atomic (interrupt context) & non-atomic (user context) functions to 175 * 1 - (atomic only) try again in non-atomic context 253 int write, int atomic, unsigned long *gpa, int *pageshift) in gru_vtop() argument 265 * Atomic lookup is faster & usually works even if called in non-atomic in gru_vtop() 271 if (atomic) in gru_vtop() 310 struct gru_thread_state *gts, int atomic, in gru_preload_tlb() argument 332 ret = gru_vtop(gts, vaddr, write, atomic, &gpa, &pageshift); in gru_preload_tlb() 338 atomic ? "atomic" : "non-atomic", gru->gs_gid, gts, tfh, in gru_preload_tlb() 362 int pageshift = 0, asid, write, ret, atomic = !cbk, indexway; in gru_try_dropin() local [all …]
|