diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-03-01 21:24:21 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-03-01 21:24:21 +0200 |
| commit | cbfca7a9854061e3a2d59795361fb875827e7c50 (patch) | |
| tree | 5cc7ba8e21e5194afa5e81054d825f91315b10e0 /include/apos/vmem.h | |
| parent | 2f7742acbeace74f09c8d7bb04cf127a84778712 (diff) | |
| download | kmi-cbfca7a9854061e3a2d59795361fb875827e7c50.tar.gz kmi-cbfca7a9854061e3a2d59795361fb875827e7c50.zip | |
make vmflags_t 16 bits
lower 8 bits are reserved for arch-specific flags (but at least
read/write/execute) and higher 8 bits are metadata, currently only for
VM_VIRTUAL (to be used when the backing physical memory shouldn't be
freed)
Diffstat (limited to 'include/apos/vmem.h')
| -rw-r--r-- | include/apos/vmem.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/apos/vmem.h b/include/apos/vmem.h index 92e9d61..cbdef2e 100644 --- a/include/apos/vmem.h +++ b/include/apos/vmem.h @@ -21,4 +21,7 @@ stat_t free_uvmem_wrapper(struct vm_branch *b, pm_t *offset, vm_t vaddr, vmflags #define unmap_freed_region(b, start, bytes)\ map_fill_region(b, &free_uvmem_wrapper, 0, start, bytes, 0) +#define vm_flags(x) ((x) & ~0xff) +#define vp_flags(x) ((x) & 0xff) + #endif /* APOS_VMEM_H */ |
