Add vm_page_free_etc()

It additionally gets a vm_page_reservation* argument. If not NULL, the
page count of the reservation is incremented for the freed page.
This commit is contained in:
Ingo Weinhold
2014-10-29 02:36:08 +01:00
parent 70d3bd5592
commit 9da590f73e
2 changed files with 27 additions and 6 deletions
+11 -1
View File
@@ -34,7 +34,9 @@ status_t vm_page_init_post_thread(struct kernel_args *args);
status_t vm_mark_page_inuse(page_num_t page);
status_t vm_mark_page_range_inuse(page_num_t startPage, page_num_t length);
void vm_page_free(struct VMCache *cache, struct vm_page *page);
void vm_page_free_etc(VMCache* cache, vm_page* page,
vm_page_reservation* reservation);
void vm_page_set_state(struct vm_page *page, int state);
void vm_page_requeue(struct vm_page *page, bool tail);
@@ -71,4 +73,12 @@ bool vm_page_is_dummy(struct vm_page *page);
}
#endif
static inline void
vm_page_free(struct VMCache *cache, struct vm_page *page)
{
vm_page_free_etc(cache, page, NULL);
}
#endif /* _KERNEL_VM_VM_PAGE_H */