include/linux/atomic/atomic-arch-fallback.h
Source file repositories/reference/linux-study-clean/include/linux/atomic/atomic-arch-fallback.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/atomic/atomic-arch-fallback.h- Extension
.h- Size
- 129321 bytes
- Lines
- 4694
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
Dependency Surface
linux/compiler.hasm-generic/atomic64.h
Detected Declarations
function raw_atomic_readfunction raw_atomic_read_acquirefunction raw_atomic_setfunction raw_atomic_set_releasefunction raw_atomic_addfunction raw_atomic_add_returnfunction raw_atomic_add_return_acquirefunction raw_atomic_add_return_releasefunction raw_atomic_add_return_relaxedfunction raw_atomic_fetch_addfunction raw_atomic_fetch_add_acquirefunction raw_atomic_fetch_add_releasefunction raw_atomic_fetch_add_relaxedfunction raw_atomic_subfunction raw_atomic_sub_returnfunction raw_atomic_sub_return_acquirefunction raw_atomic_sub_return_releasefunction raw_atomic_sub_return_relaxedfunction raw_atomic_fetch_subfunction raw_atomic_fetch_sub_acquirefunction raw_atomic_fetch_sub_releasefunction raw_atomic_fetch_sub_relaxedfunction raw_atomic_incfunction raw_atomic_inc_returnfunction raw_atomic_inc_return_acquirefunction raw_atomic_inc_return_releasefunction raw_atomic_inc_return_relaxedfunction raw_atomic_fetch_incfunction raw_atomic_fetch_inc_acquirefunction raw_atomic_fetch_inc_releasefunction raw_atomic_fetch_inc_relaxedfunction raw_atomic_decfunction raw_atomic_dec_returnfunction raw_atomic_dec_return_acquirefunction raw_atomic_dec_return_releasefunction raw_atomic_dec_return_relaxedfunction raw_atomic_fetch_decfunction raw_atomic_fetch_dec_acquirefunction raw_atomic_fetch_dec_releasefunction raw_atomic_fetch_dec_relaxedfunction raw_atomic_andfunction raw_atomic_fetch_andfunction raw_atomic_fetch_and_acquirefunction raw_atomic_fetch_and_releasefunction raw_atomic_fetch_and_relaxedfunction raw_atomic_andnotfunction raw_atomic_fetch_andnotfunction raw_atomic_fetch_andnot_acquire
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
// Generated by scripts/atomic/gen-atomic-fallback.sh
// DO NOT MODIFY THIS FILE DIRECTLY
#ifndef _LINUX_ATOMIC_FALLBACK_H
#define _LINUX_ATOMIC_FALLBACK_H
#include <linux/compiler.h>
#if defined(arch_xchg)
#define raw_xchg arch_xchg
#elif defined(arch_xchg_relaxed)
#define raw_xchg(...) \
__atomic_op_fence(arch_xchg, __VA_ARGS__)
#else
extern void raw_xchg_not_implemented(void);
#define raw_xchg(...) raw_xchg_not_implemented()
#endif
#if defined(arch_xchg_acquire)
#define raw_xchg_acquire arch_xchg_acquire
#elif defined(arch_xchg_relaxed)
#define raw_xchg_acquire(...) \
__atomic_op_acquire(arch_xchg, __VA_ARGS__)
#elif defined(arch_xchg)
#define raw_xchg_acquire arch_xchg
#else
extern void raw_xchg_acquire_not_implemented(void);
#define raw_xchg_acquire(...) raw_xchg_acquire_not_implemented()
#endif
#if defined(arch_xchg_release)
#define raw_xchg_release arch_xchg_release
#elif defined(arch_xchg_relaxed)
#define raw_xchg_release(...) \
__atomic_op_release(arch_xchg, __VA_ARGS__)
#elif defined(arch_xchg)
#define raw_xchg_release arch_xchg
#else
extern void raw_xchg_release_not_implemented(void);
#define raw_xchg_release(...) raw_xchg_release_not_implemented()
#endif
#if defined(arch_xchg_relaxed)
#define raw_xchg_relaxed arch_xchg_relaxed
#elif defined(arch_xchg)
#define raw_xchg_relaxed arch_xchg
#else
extern void raw_xchg_relaxed_not_implemented(void);
#define raw_xchg_relaxed(...) raw_xchg_relaxed_not_implemented()
#endif
#if defined(arch_cmpxchg)
#define raw_cmpxchg arch_cmpxchg
#elif defined(arch_cmpxchg_relaxed)
#define raw_cmpxchg(...) \
__atomic_op_fence(arch_cmpxchg, __VA_ARGS__)
#else
extern void raw_cmpxchg_not_implemented(void);
#define raw_cmpxchg(...) raw_cmpxchg_not_implemented()
#endif
#if defined(arch_cmpxchg_acquire)
#define raw_cmpxchg_acquire arch_cmpxchg_acquire
#elif defined(arch_cmpxchg_relaxed)
#define raw_cmpxchg_acquire(...) \
__atomic_op_acquire(arch_cmpxchg, __VA_ARGS__)
#elif defined(arch_cmpxchg)
#define raw_cmpxchg_acquire arch_cmpxchg
#else
extern void raw_cmpxchg_acquire_not_implemented(void);
#define raw_cmpxchg_acquire(...) raw_cmpxchg_acquire_not_implemented()
#endif
#if defined(arch_cmpxchg_release)
#define raw_cmpxchg_release arch_cmpxchg_release
#elif defined(arch_cmpxchg_relaxed)
#define raw_cmpxchg_release(...) \
__atomic_op_release(arch_cmpxchg, __VA_ARGS__)
#elif defined(arch_cmpxchg)
#define raw_cmpxchg_release arch_cmpxchg
#else
extern void raw_cmpxchg_release_not_implemented(void);
#define raw_cmpxchg_release(...) raw_cmpxchg_release_not_implemented()
#endif
#if defined(arch_cmpxchg_relaxed)
#define raw_cmpxchg_relaxed arch_cmpxchg_relaxed
#elif defined(arch_cmpxchg)
Annotation
- Immediate include surface: `linux/compiler.h`, `asm-generic/atomic64.h`.
- Detected declarations: `function raw_atomic_read`, `function raw_atomic_read_acquire`, `function raw_atomic_set`, `function raw_atomic_set_release`, `function raw_atomic_add`, `function raw_atomic_add_return`, `function raw_atomic_add_return_acquire`, `function raw_atomic_add_return_release`, `function raw_atomic_add_return_relaxed`, `function raw_atomic_fetch_add`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.