[kernel] Allow passing 0 to vma_resize to query the current size

Passing a size of 0 in to vma_resize will now not attempt to alter the VMA size, but will
still put the size into the passed-in pointer. Using this allows querying the size of a
VMA without changing it.
This commit is contained in:
Justin C. Miller
2024-02-18 17:27:07 -08:00
parent 55a485ee67
commit f51f519c31
3 changed files with 8 additions and 4 deletions

View File

@@ -22,8 +22,8 @@ enum class vm_flags : uint32_t
#define VM_FLAG(name, v) name = v,
#include <j6/tables/vm_flags.inc>
#undef VM_FLAG
driver_mask = 0x000fffff, ///< flags allowed via syscall for drivers
user_mask = 0x0000ffff, ///< flags allowed via syscall for non-drivers
driver_mask = 0x00ff'ffff, ///< flags allowed via syscall for drivers
user_mask = 0x000f'ffff, ///< flags allowed via syscall for non-drivers
};
is_bitfield(vm_flags);