tools/testing/selftests/filesystems/empty_mntns/empty_mntns.h
Source file repositories/reference/linux-study-clean/tools/testing/selftests/filesystems/empty_mntns/empty_mntns.h
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/filesystems/empty_mntns/empty_mntns.h- Extension
.h- Size
- 491 bytes
- Lines
- 26
- 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.
Dependency Surface
errno.hstdlib.h../statmount/statmount.h
Detected Declarations
function count_mounts
Annotated Snippet
#ifndef EMPTY_MNTNS_H
#define EMPTY_MNTNS_H
#include <errno.h>
#include <stdlib.h>
#include "../statmount/statmount.h"
#ifndef UNSHARE_EMPTY_MNTNS
#define UNSHARE_EMPTY_MNTNS 0x00100000
#endif
#ifndef CLONE_EMPTY_MNTNS
#define CLONE_EMPTY_MNTNS (1ULL << 37)
#endif
static inline ssize_t count_mounts(void)
{
uint64_t list[4096];
return listmount(LSMT_ROOT, 0, 0, list, sizeof(list) / sizeof(list[0]), 0);
}
#endif /* EMPTY_MNTNS_H */
Annotation
- Immediate include surface: `errno.h`, `stdlib.h`, `../statmount/statmount.h`.
- Detected declarations: `function count_mounts`.
- 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.