arch/x86/include/asm/rqspinlock.h
Source file repositories/reference/linux-study-clean/arch/x86/include/asm/rqspinlock.h
File Facts
- System
- Linux kernel
- Corpus path
arch/x86/include/asm/rqspinlock.h- Extension
.h- Size
- 847 bytes
- Lines
- 34
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
asm/paravirt.hasm-generic/rqspinlock.h
Detected Declarations
function resilient_virt_spin_lock_enabledfunction resilient_virt_spin_lock
Annotated Snippet
#ifndef _ASM_X86_RQSPINLOCK_H
#define _ASM_X86_RQSPINLOCK_H
#include <asm/paravirt.h>
#ifdef CONFIG_PARAVIRT
DECLARE_STATIC_KEY_FALSE(virt_spin_lock_key);
#define resilient_virt_spin_lock_enabled resilient_virt_spin_lock_enabled
static __always_inline bool resilient_virt_spin_lock_enabled(void)
{
return static_branch_likely(&virt_spin_lock_key);
}
#ifdef CONFIG_QUEUED_SPINLOCKS
typedef struct qspinlock rqspinlock_t;
#else
typedef struct rqspinlock rqspinlock_t;
#endif
extern int resilient_tas_spin_lock(rqspinlock_t *lock);
#define resilient_virt_spin_lock resilient_virt_spin_lock
static inline int resilient_virt_spin_lock(rqspinlock_t *lock)
{
return resilient_tas_spin_lock(lock);
}
#endif /* CONFIG_PARAVIRT */
#include <asm-generic/rqspinlock.h>
#endif /* _ASM_X86_RQSPINLOCK_H */
Annotation
- Immediate include surface: `asm/paravirt.h`, `asm-generic/rqspinlock.h`.
- Detected declarations: `function resilient_virt_spin_lock_enabled`, `function resilient_virt_spin_lock`.
- Atlas domain: Architecture Layer / arch/x86.
- 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.