mirror of
https://github.com/drasko/codezero.git
synced 2026-02-07 23:43:15 +01:00
Wiring between mm0 page cache and vfs almost what it should look like.
This implements the infrastructure for read/write system calls where file content is first searched in mm0's page cache and then read-in or written via the vfs read/write functions. modified: tasks/fs0/src/syscalls.c modified: tasks/mm0/include/lib/bit.h modified: tasks/mm0/include/lib/idpool.h modified: tasks/mm0/include/task.h modified: tasks/mm0/include/vm_area.h modified: tasks/mm0/main.c modified: tasks/mm0/src/devzero.c modified: tasks/mm0/src/fault.c new file: tasks/mm0/src/file.c modified: tasks/mm0/src/init.c modified: tasks/mm0/src/lib/bit.c modified: tasks/mm0/src/lib/idpool.c modified: tasks/mm0/src/task.c
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include <task.h>
|
||||
#include <vm_area.h>
|
||||
#include <syscalls.h>
|
||||
#include <file.h>
|
||||
|
||||
/* FIXME:LOCKING:FIXME:LOCKING:FIXME:LOCKING
|
||||
* NOTE: For multithreadded MM0, not suprisingly, we need locking on
|
||||
@@ -83,6 +84,20 @@ void handle_requests(void)
|
||||
sys_shmdt(sender, (void *)mr[0]);
|
||||
break;
|
||||
|
||||
case L4_IPC_TAG_PAGER_SYSOPEN:
|
||||
/* vfs opens a file and tells us about it here. */
|
||||
vfs_receive_sys_open(sender, (l4id_t)mr[0], (int)mr[1],
|
||||
(unsigned long)mr[2], (unsigned long)mr[3]);
|
||||
break;
|
||||
|
||||
case L4_IPC_TAG_READ:
|
||||
sys_read(sender, (int)mr[0], (void *)mr[1], (int)mr[2]);
|
||||
break;
|
||||
|
||||
case L4_IPC_TAG_WRITE:
|
||||
sys_write(sender, (int)mr[0], (void *)mr[1], (int)mr[2]);
|
||||
break;
|
||||
|
||||
case L4_IPC_TAG_MMAP: {
|
||||
struct sys_mmap_args *args = (struct sys_mmap_args *)&mr[0];
|
||||
BUG(); /* FIXME: There are 8 arguments to ipc whereas there are 7 mrs available. Fix this by increasing MRs to 8 ??? */
|
||||
|
||||
Reference in New Issue
Block a user