tools/virtio/linux/err.h
Source file repositories/reference/linux-study-clean/tools/virtio/linux/err.h
File Facts
- System
- Linux kernel
- Corpus path
tools/virtio/linux/err.h- Extension
.h- Size
- 590 bytes
- Lines
- 29
- 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/kernel.h
Detected Declarations
function ERR_PTRfunction PTR_ERRfunction IS_ERRfunction IS_ERR_OR_NULL
Annotated Snippet
#ifndef ERR_H
#define ERR_H
#include <linux/kernel.h>
#define MAX_ERRNO 4095
#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO)
static inline void * __must_check ERR_PTR(long error)
{
return (void *) error;
}
static inline long __must_check PTR_ERR(const void *ptr)
{
return (long) ptr;
}
static inline long __must_check IS_ERR(const void *ptr)
{
return IS_ERR_VALUE((unsigned long)ptr);
}
static inline long __must_check IS_ERR_OR_NULL(const void *ptr)
{
return !ptr || IS_ERR_VALUE((unsigned long)ptr);
}
#endif /* ERR_H */
Annotation
- Immediate include surface: `linux/kernel.h`.
- Detected declarations: `function ERR_PTR`, `function PTR_ERR`, `function IS_ERR`, `function IS_ERR_OR_NULL`.
- 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.