* Changed some parameters of VM syscalls from int to uint32, mostly for sake
of consistency. * Moved the B_OVERCOMMITTING_AREA flag from B_KERNEL_AREA_FLAGS to B_USER_AREA_FLAGS, since we really allow it to be passed from userland. * Most VM syscalls check the provided protection against B_USER_AREA_FLAGS instead of B_USER_PROTECTION, now. This way they allow for B_OVERCOMMITTING_AREA as well. * _user_map_file(), _user_set_memory_protection(): Check the protection like the other syscalls do and use fix_protection() instead of doing that manually. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36572 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -398,15 +398,15 @@ extern status_t _kern_reserve_address_range(addr_t* _address,
|
||||
extern status_t _kern_unreserve_address_range(addr_t address, addr_t size);
|
||||
|
||||
extern area_id _kern_map_file(const char *name, void **address,
|
||||
int addressSpec, size_t size, int protection,
|
||||
int mapping, bool unmapAddressRange, int fd,
|
||||
uint32 addressSpec, size_t size, uint32 protection,
|
||||
uint32 mapping, bool unmapAddressRange, int fd,
|
||||
off_t offset);
|
||||
extern status_t _kern_unmap_memory(void *address, size_t size);
|
||||
extern status_t _kern_set_memory_protection(void *address, size_t size,
|
||||
int protection);
|
||||
uint32 protection);
|
||||
extern status_t _kern_sync_memory(void *address, size_t size, int flags);
|
||||
extern status_t _kern_memory_advice(void *address, size_t size,
|
||||
int advice);
|
||||
uint32 advice);
|
||||
|
||||
/* kernel port functions */
|
||||
extern port_id _kern_create_port(int32 queue_length, const char *name);
|
||||
|
||||
@@ -42,10 +42,9 @@
|
||||
// Usable from userland according to its protection flags, but the area
|
||||
// itself is not deletable, resizable, etc from userland.
|
||||
|
||||
#define B_USER_AREA_FLAGS (B_USER_PROTECTION)
|
||||
#define B_USER_AREA_FLAGS (B_USER_PROTECTION | B_OVERCOMMITTING_AREA)
|
||||
#define B_KERNEL_AREA_FLAGS \
|
||||
(B_KERNEL_PROTECTION | B_USER_CLONEABLE_AREA | B_OVERCOMMITTING_AREA \
|
||||
| B_SHARED_AREA)
|
||||
(B_KERNEL_PROTECTION | B_USER_CLONEABLE_AREA | B_SHARED_AREA)
|
||||
|
||||
// mapping argument for several internal VM functions
|
||||
enum {
|
||||
|
||||
Reference in New Issue
Block a user