Documentation/userspace-api/ntsync.rst
Source file repositories/reference/linux-study-clean/Documentation/userspace-api/ntsync.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/userspace-api/ntsync.rst- Extension
.rst- Size
- 14938 bytes
- Lines
- 386
- Domain
- Support Tooling And Documentation
- Bucket
- Documentation
- Inferred role
- Support Tooling And Documentation: documentation
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct ntsync_sem_argsstruct ntsync_mutex_argsstruct ntsync_event_argsstruct ntsync_wait_args
Annotated Snippet
struct ntsync_sem_args {
__u32 count;
__u32 max;
};
struct ntsync_mutex_args {
__u32 owner;
__u32 count;
};
struct ntsync_event_args {
__u32 signaled;
__u32 manual;
};
struct ntsync_wait_args {
__u64 timeout;
__u64 objs;
__u32 count;
__u32 owner;
__u32 index;
__u32 alert;
__u32 flags;
__u32 pad;
};
Depending on the ioctl, members of the structure may be used as input,
output, or not at all.
The ioctls on the device file are as follows:
.. c:macro:: NTSYNC_IOC_CREATE_SEM
Create a semaphore object. Takes a pointer to struct
:c:type:`ntsync_sem_args`, which is used as follows:
.. list-table::
* - ``count``
- Initial count of the semaphore.
* - ``max``
- Maximum count of the semaphore.
Fails with ``EINVAL`` if ``count`` is greater than ``max``.
On success, returns a file descriptor the created semaphore.
.. c:macro:: NTSYNC_IOC_CREATE_MUTEX
Create a mutex object. Takes a pointer to struct
:c:type:`ntsync_mutex_args`, which is used as follows:
.. list-table::
* - ``count``
- Initial recursion count of the mutex.
* - ``owner``
- Initial owner of the mutex.
If ``owner`` is nonzero and ``count`` is zero, or if ``owner`` is
zero and ``count`` is nonzero, the function fails with ``EINVAL``.
On success, returns a file descriptor the created mutex.
.. c:macro:: NTSYNC_IOC_CREATE_EVENT
Create an event object. Takes a pointer to struct
:c:type:`ntsync_event_args`, which is used as follows:
.. list-table::
* - ``signaled``
Annotation
- Detected declarations: `struct ntsync_sem_args`, `struct ntsync_mutex_args`, `struct ntsync_event_args`, `struct ntsync_wait_args`.
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: atlas-only.
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.