arch/sparc/include/asm/atomic_32.h
Source file repositories/reference/linux-study-clean/arch/sparc/include/asm/atomic_32.h
File Facts
- System
- Linux kernel
- Corpus path
arch/sparc/include/asm/atomic_32.h- Extension
.h- Size
- 2117 bytes
- Lines
- 62
- Domain
- Architecture Layer
- Bucket
- arch/sparc
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
Dependency Surface
linux/types.hasm/cmpxchg.hasm/barrier.hasm-generic/atomic64.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#ifndef __ARCH_SPARC_ATOMIC__
#define __ARCH_SPARC_ATOMIC__
#include <linux/types.h>
#include <asm/cmpxchg.h>
#include <asm/barrier.h>
#include <asm-generic/atomic64.h>
int arch_atomic_add_return(int, atomic_t *);
#define arch_atomic_add_return arch_atomic_add_return
int arch_atomic_fetch_add(int, atomic_t *);
#define arch_atomic_fetch_add arch_atomic_fetch_add
int arch_atomic_fetch_and(int, atomic_t *);
#define arch_atomic_fetch_and arch_atomic_fetch_and
int arch_atomic_fetch_or(int, atomic_t *);
#define arch_atomic_fetch_or arch_atomic_fetch_or
int arch_atomic_fetch_xor(int, atomic_t *);
#define arch_atomic_fetch_xor arch_atomic_fetch_xor
int arch_atomic_cmpxchg(atomic_t *, int, int);
#define arch_atomic_cmpxchg arch_atomic_cmpxchg
int arch_atomic_xchg(atomic_t *, int);
#define arch_atomic_xchg arch_atomic_xchg
int arch_atomic_fetch_add_unless(atomic_t *, int, int);
#define arch_atomic_fetch_add_unless arch_atomic_fetch_add_unless
void arch_atomic_set(atomic_t *, int);
#define arch_atomic_set_release(v, i) arch_atomic_set((v), (i))
#define arch_atomic_read(v) READ_ONCE((v)->counter)
#define arch_atomic_add(i, v) ((void)arch_atomic_add_return( (int)(i), (v)))
#define arch_atomic_sub(i, v) ((void)arch_atomic_add_return(-(int)(i), (v)))
#define arch_atomic_and(i, v) ((void)arch_atomic_fetch_and((i), (v)))
#define arch_atomic_or(i, v) ((void)arch_atomic_fetch_or((i), (v)))
#define arch_atomic_xor(i, v) ((void)arch_atomic_fetch_xor((i), (v)))
#define arch_atomic_sub_return(i, v) (arch_atomic_add_return(-(int)(i), (v)))
#define arch_atomic_fetch_sub(i, v) (arch_atomic_fetch_add (-(int)(i), (v)))
#endif /* !(__ARCH_SPARC_ATOMIC__) */
Annotation
- Immediate include surface: `linux/types.h`, `asm/cmpxchg.h`, `asm/barrier.h`, `asm-generic/atomic64.h`.
- Atlas domain: Architecture Layer / arch/sparc.
- 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.