kernel/futex/core.c
Source file repositories/reference/linux-study-clean/kernel/futex/core.c
File Facts
- System
- Linux kernel
- Corpus path
kernel/futex/core.c- Extension
.c- Size
- 55279 bytes
- Lines
- 2050
- Domain
- Core OS
- Bucket
- Scheduler, Processes, Timers, Sync, And Syscalls
- Inferred role
- Core OS: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/compat.hlinux/debugfs.hlinux/fault-inject.hlinux/gfp.hlinux/jhash.hlinux/memblock.hlinux/mempolicy.hlinux/mmap_lock.hlinux/pagemap.hlinux/plist.hlinux/prctl.hlinux/rseq.hlinux/slab.hlinux/vmalloc.hvdso/futex.hfutex.h../locking/rtmutex_common.h
Detected Declarations
struct futex_private_hashfunction setup_fail_futexfunction should_fail_futexfunction fail_futex_debugfsfunction futex_private_hash_getfunction futex_private_hash_putfunction __futex_hash_privatefunction futex_rehash_privatefunction plist_for_each_entry_safefunction __futex_pivot_hashfunction futex_pivot_hashfunction futex_hashfunction futex_hashfunction __futex_key_to_nodefunction futex_key_to_node_optfunction futex_mpolfunction futex_mpolfunction get_futex_keyfunction afunction get_futex_keyfunction access_okfunction requiredfunction lockfunction fault_in_user_writeablefunction futex_top_waiterfunction plist_for_each_entryfunction wait_for_owner_exitingfunction __futex_unqueuefunction futex_q_lockfunction futex_q_unlockfunction __futex_queuefunction futex_unqueuefunction spin_lockfunction futex_q_lockptr_lockfunction futex_unqueue_pifunction handle_futex_deathfunction exit_pi_statefunction fetch_robust_entryfunction exit_robust_listfunction robust_list_clear_pendingfunction compat_fetch_robust_entryfunction compat_exit_robust_listfunction compat_robust_list_clear_pendingfunction compat_robust_list_clear_pendingfunction exit_pi_state_listfunction exit_pi_state_listfunction __futex_fixup_robust_unlockfunction futex_cleanup
Annotated Snippet
core_initcall(futex_init);
Annotation
- Immediate include surface: `linux/compat.h`, `linux/debugfs.h`, `linux/fault-inject.h`, `linux/gfp.h`, `linux/jhash.h`, `linux/memblock.h`, `linux/mempolicy.h`, `linux/mmap_lock.h`.
- Detected declarations: `struct futex_private_hash`, `function setup_fail_futex`, `function should_fail_futex`, `function fail_futex_debugfs`, `function futex_private_hash_get`, `function futex_private_hash_put`, `function __futex_hash_private`, `function futex_rehash_private`, `function plist_for_each_entry_safe`, `function __futex_pivot_hash`.
- Atlas domain: Core OS / Scheduler, Processes, Timers, Sync, And Syscalls.
- Implementation status: integration implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
- 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.