tools/testing/selftests/timens/timens.h
Source file repositories/reference/linux-study-clean/tools/testing/selftests/timens/timens.h
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/timens/timens.h- Extension
.h- Size
- 2323 bytes
- Lines
- 112
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
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
fcntl.hunistd.hstdlib.hstdbool.hkselftest.h
Detected Declarations
function check_supported_timersfunction check_skipfunction unshare_timensfunction _settimefunction _gettimefunction nscheck
Annotated Snippet
if (clock_gettime(clk_id, res)) {
pr_perror("clock_gettime(%d)", (int)clk_id);
return -1;
}
return 0;
}
err = syscall(SYS_clock_gettime, clk_id, res);
if (err)
pr_perror("syscall(SYS_clock_gettime(%d))", (int)clk_id);
return err;
}
static inline void nscheck(void)
{
if (access("/proc/self/ns/time", F_OK) < 0)
ksft_exit_skip("Time namespaces are not supported\n");
}
#endif
Annotation
- Immediate include surface: `fcntl.h`, `unistd.h`, `stdlib.h`, `stdbool.h`, `kselftest.h`.
- Detected declarations: `function check_supported_timers`, `function check_skip`, `function unshare_timens`, `function _settime`, `function _gettime`, `function nscheck`.
- Atlas domain: Support Tooling And Documentation / tools.
- 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.