tools/testing/selftests/membarrier/membarrier_test_impl.h
Source file repositories/reference/linux-study-clean/tools/testing/selftests/membarrier/membarrier_test_impl.h
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/membarrier/membarrier_test_impl.h- Extension
.h- Size
- 9013 bytes
- Lines
- 351
- 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
linux/membarrier.hsyscall.hstdio.herrno.hstring.hpthread.hkselftest.h
Detected Declarations
function sys_membarrierfunction test_membarrier_get_registrationsfunction test_membarrier_cmd_failfunction test_membarrier_flags_failfunction test_membarrier_global_successfunction test_membarrier_private_expedited_failfunction test_membarrier_register_private_expedited_successfunction test_membarrier_private_expedited_successfunction test_membarrier_private_expedited_sync_core_failfunction test_membarrier_register_private_expedited_sync_core_successfunction test_membarrier_private_expedited_sync_core_successfunction test_membarrier_register_global_expedited_successfunction test_membarrier_global_expedited_successfunction test_membarrier_failfunction test_membarrier_successfunction test_membarrier_query
Annotated Snippet
if (errno == ENOSYS) {
/*
* It is valid to build a kernel with
* CONFIG_MEMBARRIER=n. However, this skips the tests.
*/
ksft_exit_skip(
"sys membarrier (CONFIG_MEMBARRIER) is disabled.\n");
}
ksft_exit_fail_msg("sys_membarrier() failed\n");
}
if (!(ret & MEMBARRIER_CMD_GLOBAL))
ksft_exit_skip(
"sys_membarrier unsupported: CMD_GLOBAL not found.\n");
ksft_test_result_pass("sys_membarrier available\n");
return 0;
}
Annotation
- Immediate include surface: `linux/membarrier.h`, `syscall.h`, `stdio.h`, `errno.h`, `string.h`, `pthread.h`, `kselftest.h`.
- Detected declarations: `function sys_membarrier`, `function test_membarrier_get_registrations`, `function test_membarrier_cmd_fail`, `function test_membarrier_flags_fail`, `function test_membarrier_global_success`, `function test_membarrier_private_expedited_fail`, `function test_membarrier_register_private_expedited_success`, `function test_membarrier_private_expedited_success`, `function test_membarrier_private_expedited_sync_core_fail`, `function test_membarrier_register_private_expedited_sync_core_success`.
- 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.