implement sys_munmap()
This commit is contained in:
@@ -37,6 +37,8 @@ struct cpu_local_var {
|
||||
|
||||
int status;
|
||||
int fs;
|
||||
|
||||
struct list_head pending_free_pages;
|
||||
} __attribute__((aligned(64)));
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,21 @@
|
||||
#ifndef __HEADER_PAGE_H
|
||||
#define __HEADER_PAGE_H
|
||||
|
||||
struct page {
|
||||
struct list_head list;
|
||||
uint64_t flags;
|
||||
int64_t count;
|
||||
};
|
||||
|
||||
/* flags */
|
||||
#define PAGE_IN_LIST 0x0001UL
|
||||
|
||||
struct page *phys_to_page(uintptr_t phys);
|
||||
uintptr_t page_to_phys(struct page *page);
|
||||
|
||||
void *allocate_pages(int npages, enum ihk_mc_ap_flag flag);
|
||||
void free_pages(void *va, int npages);
|
||||
void begin_free_pages_pending(void);
|
||||
void finish_free_pages_pending(void);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -131,6 +131,8 @@ struct vm_range *lookup_process_memory_range(
|
||||
struct process_vm *vm, uintptr_t start, uintptr_t end);
|
||||
struct vm_range *next_process_memory_range(
|
||||
struct process_vm *vm, struct vm_range *range);
|
||||
struct vm_range *previous_process_memory_range(
|
||||
struct process_vm *vm, struct vm_range *range);
|
||||
int remove_process_region(struct process *proc,
|
||||
unsigned long start, unsigned long end);
|
||||
struct program_load_desc;
|
||||
|
||||
Reference in New Issue
Block a user