aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/user/pager.c
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2015-03-09 17:27:27 +0100
committerAlex Auvolat <alex@adnab.me>2015-03-09 17:27:27 +0100
commit00ea1bdfe3d0758dc42942c5994664c51badf2f8 (patch)
tree8f1ea691be085f303a56de8977b186545481a292 /src/kernel/user/pager.c
parent3341e7a3a184b5bea17f0f678b40bc51c92d72a4 (diff)
downloadkogata-00ea1bdfe3d0758dc42942c5994664c51badf2f8.tar.gz
kogata-00ea1bdfe3d0758dc42942c5994664c51badf2f8.zip
Remove kernel region pf handlers ; fix forget-to-zero-out bug.
Diffstat (limited to 'src/kernel/user/pager.c')
-rw-r--r--src/kernel/user/pager.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/kernel/user/pager.c b/src/kernel/user/pager.c
index b1ce9c3..45d2970 100644
--- a/src/kernel/user/pager.c
+++ b/src/kernel/user/pager.c
@@ -47,7 +47,7 @@ error:
void swap_page_in(pager_t *p, size_t offset, size_t len) {
ASSERT(PAGE_ALIGNED(offset));
- void *region = region_alloc(PAGE_SIZE, "Page zeroing area", 0);
+ void *region = region_alloc(PAGE_SIZE, "Page zeroing area");
if (region == 0) return;
for (size_t page = offset; page < offset + len; page += PAGE_SIZE) {
@@ -92,7 +92,7 @@ bool swap_pager_resize(pager_t *p, size_t new_size) {
size_t last_page = PAGE_ALIGN_DOWN(new_size);
if (!PAGE_ALIGNED(new_size) && hashtbl_find(p->pages, (void*)last_page) != 0) {
- void *region = region_alloc(PAGE_SIZE, "Page zeroing area", 0);
+ void *region = region_alloc(PAGE_SIZE, "Page zeroing area");
if (!region) PANIC("TODO");
uint32_t frame = (uint32_t)hashtbl_find(p->pages, (void*)last_page) >> ENT_FRAME_SHIFT;
@@ -154,7 +154,7 @@ void vfs_page_in(pager_t *p, size_t offset, size_t len) {
ASSERT(PAGE_ALIGNED(offset));
ASSERT(p->vfs_pager.ops->read != 0);
- void *region = region_alloc(PAGE_SIZE, "Page loading area", 0);
+ void *region = region_alloc(PAGE_SIZE, "Page loading area");
if (region == 0) return;
for (size_t page = offset; page < offset + len; page += PAGE_SIZE) {
@@ -332,7 +332,7 @@ size_t pager_do_rw(pager_t *p, size_t offset, size_t len, char* buf, bool write)
size_t first_page = PAGE_ALIGN_DOWN(offset);
size_t region_len = offset + len - first_page;
- region = region_alloc(PAGE_ALIGN_UP(region_len), "Temporary pager read/write zone", 0);
+ region = region_alloc(PAGE_ALIGN_UP(region_len), "Temporary pager read/write zone");
if (region == 0) goto end_read;
p->ops->page_in(p, first_page, region_len);