include/vdso/futex.h
Source file repositories/reference/linux-study-clean/include/vdso/futex.h
File Facts
- System
- Linux kernel
- Corpus path
include/vdso/futex.h- Extension
.h- Size
- 1975 bytes
- Lines
- 53
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
Dependency Surface
uapi/linux/types.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#ifndef _VDSO_FUTEX_H
#define _VDSO_FUTEX_H
#include <uapi/linux/types.h>
/**
* __vdso_futex_robust_list64_try_unlock - Try to unlock an uncontended robust futex
* with a 64-bit pending op pointer
* @lock: Pointer to the futex lock object
* @tid: The TID of the calling task
* @pop: Pointer to the task's robust_list_head::list_pending_op
*
* Return: The content of *@lock. On success this is the same as @tid.
*
* The function implements:
* if (atomic_try_cmpxchg(lock, &tid, 0))
* *op = NULL;
* return tid;
*
* There is a race between a successful unlock and clearing the pending op
* pointer in the robust list head. If the calling task is interrupted in the
* race window and has to handle a (fatal) signal on return to user space then
* the kernel handles the clearing of @pending_op before attempting to deliver
* the signal. That ensures that a task cannot exit with a potentially invalid
* pending op pointer.
*
* User space uses it in the following way:
*
* if (__vdso_futex_robust_list64_try_unlock(lock, tid, &pending_op) != tid)
* err = sys_futex($OP | FUTEX_ROBUST_UNLOCK,....);
*
* If the unlock attempt fails due to the FUTEX_WAITERS bit set in the lock,
* then the syscall does the unlock, clears the pending op pointer and wakes the
* requested number of waiters.
*/
__u32 __vdso_futex_robust_list64_try_unlock(__u32 *lock, __u32 tid, __u64 *pop);
/**
* __vdso_futex_robust_list32_try_unlock - Try to unlock an uncontended robust futex
* with a 32-bit pending op pointer
* @lock: Pointer to the futex lock object
* @tid: The TID of the calling task
* @pop: Pointer to the task's robust_list_head::list_pending_op
*
* Return: The content of *@lock. On success this is the same as @tid.
*
* Same as __vdso_futex_robust_list64_try_unlock() just with a 32-bit @pop pointer.
*/
__u32 __vdso_futex_robust_list32_try_unlock(__u32 *lock, __u32 tid, __u32 *pop);
#endif
Annotation
- Immediate include surface: `uapi/linux/types.h`.
- Atlas domain: Repository Root And Misc / include.
- 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.