tools/include/nolibc/assert.h
Source file repositories/reference/linux-study-clean/tools/include/nolibc/assert.h
File Facts
- System
- Linux kernel
- Corpus path
tools/include/nolibc/assert.h- Extension
.h- Size
- 756 bytes
- Lines
- 37
- 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
nolibc.herrno.hstdio.hstdlib.h
Detected Declarations
function Copyright
Annotated Snippet
#include "nolibc.h"
#ifndef _NOLIBC_ASSERT_H
#define _NOLIBC_ASSERT_H
#include "errno.h"
#include "stdio.h"
#include "stdlib.h"
#endif /* _NOLIBC_ASSERT_H */
/* NDEBUG needs to be evaluated on *each* inclusion */
#ifdef assert
#undef assert
#endif
#ifndef NDEBUG
#define assert(expr) \
({ \
if (!(expr)) { \
fprintf(stderr, "%s: %s:%d: %s: Assertion `%s' failed.\n", \
program_invocation_short_name, __FILE__, __LINE__, __func__, \
#expr); \
abort(); \
} \
})
#else
#define assert(expr) ((void)0)
#endif
Annotation
- Immediate include surface: `nolibc.h`, `errno.h`, `stdio.h`, `stdlib.h`.
- Detected declarations: `function Copyright`.
- 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.