Rearranged devzero. More bugs to fix.

This commit is contained in:
Bahadir Balban
2008-02-05 01:21:55 +00:00
parent b725d09eff
commit 3a07ae70fd
6 changed files with 22 additions and 9 deletions

View File

@@ -9,10 +9,9 @@
#include <posix/sys/types.h>
#include <task.h>
#include <mmap.h>
#include <memory.h>
#include <l4lib/arch/syscalls.h>
static struct vm_file devzero;
/* Swap related bookkeeping.
static struct vm_file shm_swap_file;
static struct id_pool *swap_file_offset_pool;
@@ -253,7 +252,6 @@ int vma_swapfile_realloc(struct vm_area *vma, unsigned long pfn_start,
}
/* This shrinks the vma from *one* end only, either start or end */
int vma_shrink(struct vm_area *vma, struct tcb *task, unsigned long pfn_start,
unsigned long pfn_end)
@@ -441,7 +439,7 @@ int do_mmap(struct vm_file *mapfile, unsigned long f_offset, struct tcb *t,
if (!mapfile) {
if (flags & VMA_ANON) {
mapfile = &devzero;
mapfile = get_devzero();
f_offset = 0;
} else
BUG();