* Implemented mprotect(). A vm_area does now have an optional array
specifying the protection of each page (4 bits per page). * Added no-op implementation of posix_madvise(). * Replaced a few "addr_t size" parameters by "size_t size". git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26871 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -93,10 +93,15 @@ off_t vm_available_not_needed_memory(void);
|
||||
area_id _user_create_area(const char *name, void **address, uint32 addressSpec,
|
||||
size_t size, uint32 lock, uint32 protection);
|
||||
status_t _user_delete_area(area_id area);
|
||||
|
||||
area_id _user_map_file(const char *uname, void **uaddress, int addressSpec,
|
||||
addr_t size, int protection, int mapping, int fd, off_t offset);
|
||||
status_t _user_unmap_memory(void *address, addr_t size);
|
||||
status_t _user_sync_memory(void *address, addr_t size, int flags);
|
||||
size_t size, int protection, int mapping, int fd, off_t offset);
|
||||
status_t _user_unmap_memory(void *address, size_t size);
|
||||
status_t _user_set_memory_protection(void* address, size_t size,
|
||||
int protection);
|
||||
status_t _user_sync_memory(void *address, size_t size, int flags);
|
||||
status_t _user_memory_advice(void* address, size_t size, int advice);
|
||||
|
||||
area_id _user_area_for(void *address);
|
||||
area_id _user_find_area(const char *name);
|
||||
status_t _user_get_area_info(area_id area, area_info *info);
|
||||
|
||||
@@ -301,6 +301,7 @@ struct vm_area {
|
||||
off_t cache_offset;
|
||||
uint32 cache_type;
|
||||
vm_area_mappings mappings;
|
||||
uint8 *page_protections;
|
||||
|
||||
struct vm_address_space *address_space;
|
||||
struct vm_area *address_space_next;
|
||||
|
||||
@@ -327,10 +327,14 @@ extern status_t _kern_reserve_heap_address_range(addr_t* _address, uint32 addre
|
||||
addr_t size);
|
||||
|
||||
extern area_id _kern_map_file(const char *name, void **address,
|
||||
int addressSpec, addr_t size, int protection,
|
||||
int addressSpec, size_t size, int protection,
|
||||
int mapping, int fd, off_t offset);
|
||||
extern status_t _kern_unmap_memory(void *address, addr_t size);
|
||||
extern status_t _kern_sync_memory(void *address, addr_t size, int flags);
|
||||
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);
|
||||
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);
|
||||
|
||||
/* kernel port functions */
|
||||
extern port_id _kern_create_port(int32 queue_length, const char *name);
|
||||
|
||||
Reference in New Issue
Block a user