arch/x86/include/asm/spinlock.h
Source file repositories/reference/linux-study-clean/arch/x86/include/asm/spinlock.h
File Facts
- System
- Linux kernel
- Corpus path
arch/x86/include/asm/spinlock.h- Extension
.h- Size
- 1188 bytes
- Lines
- 45
- Domain
- Architecture Layer
- Bucket
- arch/x86
- 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.
Dependency Surface
linux/jump_label.hlinux/atomic.hasm/page.hasm/processor.hlinux/compiler.hasm/bitops.hasm/qspinlock.hasm/qrwlock.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#ifndef _ASM_X86_SPINLOCK_H
#define _ASM_X86_SPINLOCK_H
#include <linux/jump_label.h>
#include <linux/atomic.h>
#include <asm/page.h>
#include <asm/processor.h>
#include <linux/compiler.h>
#include <asm/bitops.h>
/*
* Your basic SMP spinlocks, allowing only a single CPU anywhere
*
* Simple spin lock operations. There are two variants, one clears IRQ's
* on the local processor, one does not.
*
* These are fair FIFO ticket locks, which support up to 2^16 CPUs.
*
* (the type definitions are in asm/spinlock_types.h)
*/
/* How long a lock should spin before we consider blocking */
#define SPIN_THRESHOLD (1 << 15)
#include <asm/qspinlock.h>
/*
* Read-write spinlocks, allowing multiple readers
* but only one writer.
*
* NOTE! it is quite common to have readers in interrupts
* but no interrupt writers. For those circumstances we
* can "mix" irq-safe locks - any writer needs to get a
* irq-safe write-lock, but readers can get non-irqsafe
* read-locks.
*
* On x86, we implement read-write locks using the generic qrwlock with
* x86 specific optimization.
*/
#include <asm/qrwlock.h>
#endif /* _ASM_X86_SPINLOCK_H */
Annotation
- Immediate include surface: `linux/jump_label.h`, `linux/atomic.h`, `asm/page.h`, `asm/processor.h`, `linux/compiler.h`, `asm/bitops.h`, `asm/qspinlock.h`, `asm/qrwlock.h`.
- Atlas domain: Architecture Layer / arch/x86.
- Implementation status: source implementation candidate.
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.