Add vm_mmap2(), vm_mprotect(), vm_msync(), vm_munlock(), vm_munmap(),
and vm_madvise(), and use them in various compats instead of their
sys_*() counterparts.
Details
Details
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
I think this is a right change to do. But I suggest to follow the naming conventions of all other syscall subroutines and utilize the kern_ prefix. In other words, for instance vm_munlock() should be named kern_vm_munlock(). I do not think that we ever pretend that our VM is still Mach VM.
sys/vm/vm_extern.h | ||
---|---|---|
74 ↗ | (On Diff #24558) | Wouldn't it make more sense to just call them kern_mmap(), etc. and place these prototypes in sys/sysproto.h? |
sys/vm/vm_extern.h | ||
---|---|---|
74 ↗ | (On Diff #24558) | This would require either contaminating sys/sysproto.h with all the vm_offset_t, vm_size_t etc, or changing the types which is error prone. So I think the current way is safer, and the "kern_vm_" provides a hint to the reader that those are declared somewhere else. |