arch/um/drivers/cow_sys.h
Source file repositories/reference/linux-study-clean/arch/um/drivers/cow_sys.h
File Facts
- System
- Linux kernel
- Corpus path
arch/um/drivers/cow_sys.h- Extension
.h- Size
- 713 bytes
- Lines
- 42
- Domain
- Architecture Layer
- Bucket
- arch/um
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
Dependency Surface
kern_util.hos.hum_malloc.h
Detected Declarations
function cow_freefunction cow_seek_filefunction cow_file_sizefunction cow_write_file
Annotated Snippet
#ifndef __COW_SYS_H__
#define __COW_SYS_H__
#include <kern_util.h>
#include <os.h>
#include <um_malloc.h>
static inline void *cow_malloc(int size)
{
return uml_kmalloc(size, UM_GFP_KERNEL);
}
static inline void cow_free(void *ptr)
{
kfree(ptr);
}
#define cow_printf printk
static inline char *cow_strdup(char *str)
{
return uml_strdup(str);
}
static inline int cow_seek_file(int fd, __u64 offset)
{
return os_seek_file(fd, offset);
}
static inline int cow_file_size(char *file, unsigned long long *size_out)
{
return os_file_size(file, size_out);
}
static inline int cow_write_file(int fd, void *buf, int size)
{
return os_write_file(fd, buf, size);
}
#endif
Annotation
- Immediate include surface: `kern_util.h`, `os.h`, `um_malloc.h`.
- Detected declarations: `function cow_free`, `function cow_seek_file`, `function cow_file_size`, `function cow_write_file`.
- Atlas domain: Architecture Layer / arch/um.
- 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.