summaryrefslogtreecommitdiff
path: root/kernel/defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/defs.h')
-rw-r--r--kernel/defs.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/kernel/defs.h b/kernel/defs.h
index 541c97e..6257437 100644
--- a/kernel/defs.h
+++ b/kernel/defs.h
@@ -45,6 +45,9 @@ void fileinit(void);
int fileread(struct file*, uint64, int n);
int filestat(struct file*, uint64 addr);
int filewrite(struct file*, uint64, int n);
+int fileperm(struct file*);
+int mmap_read(struct file*, uint64, uint64, int);
+int munmap_write(struct file*, uint64, uint64, int);
// fs.c
void fsinit(int);
@@ -124,6 +127,8 @@ int either_copyin(void *dst, int user_src, uint64 src, uint64 len);
void procdump(void);
int get_nproc(void);
int pgaccess(uint64 base, int len, uint64 mask);
+uint64 mmap(uint64 addr, uint64 len, int prot, int flags, int fd, struct file* file, uint64 offset);
+int munmap(uint64 addr, uint64 len);
// swtch.S
void swtch(struct context*, struct context*);
@@ -163,6 +168,9 @@ int fetchstr(uint64, char*, int);
int fetchaddr(uint64, uint64*);
void syscall();
+// sysfile.c
+int argfd(int n, int *pfd, struct file **pf);
+
// sysinfo.c
int sys_info(uint64);
@@ -189,7 +197,7 @@ pagetable_t uvmcreate(void);
void uvmfirst(pagetable_t, uchar *, uint);
uint64 uvmalloc(pagetable_t, uint64, uint64, int);
uint64 uvmdealloc(pagetable_t, uint64, uint64);
-int uvmcopy(pagetable_t, pagetable_t, uint64);
+int uvmcopy(pagetable_t, pagetable_t, uint64, uint64);
void uvmfree(pagetable_t, uint64);
void uvmunmap(pagetable_t, uint64, uint64, int);
void uvmclear(pagetable_t, uint64);