diff options
author | Mole Shang <[email protected]> | 2024-02-13 19:39:56 +0800 |
---|---|---|
committer | Mole Shang <[email protected]> | 2024-02-13 19:39:56 +0800 |
commit | 89ef6f717ed4b3e702e5f6f906f58fe1ea27d366 (patch) | |
tree | 760cce316675479a6cca77551438e8d2cc5fe9ae /kernel/defs.h | |
parent | cfae93475dfb4cb5cfe264f4c029136e1447c262 (diff) | |
parent | 4a6593f1a6f666c618d303a4858c4c6d31b41c63 (diff) | |
download | xv6-labs-89ef6f717ed4b3e702e5f6f906f58fe1ea27d366.tar.gz xv6-labs-89ef6f717ed4b3e702e5f6f906f58fe1ea27d366.tar.bz2 xv6-labs-89ef6f717ed4b3e702e5f6f906f58fe1ea27d366.zip |
Merge branch 'cow' into net
Conflicts:
.gitignore
Makefile
conf/lab.mk
kernel/defs.h
kernel/syscall.c
kernel/vm.c
user/pingpong.c
user/user.h
user/usys.pl
Diffstat (limited to 'kernel/defs.h')
-rw-r--r-- | kernel/defs.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/kernel/defs.h b/kernel/defs.h index c6fef8c..02226b5 100644 --- a/kernel/defs.h +++ b/kernel/defs.h @@ -12,6 +12,7 @@ struct superblock; struct mbuf; struct sock; #endif +struct sysinfo; // bio.c void binit(void); @@ -26,6 +27,9 @@ void consoleinit(void); void consoleintr(int); void consputc(int); +// cow.c +int cow_handler(pagetable_t, uint64); + // exec.c int exec(char*, char**); @@ -64,9 +68,12 @@ void ramdiskintr(void); void ramdiskrw(struct buf*); // kalloc.c +int refcnt_inc(uint64); +int refcnt_dec(uint64); void* kalloc(void); void kfree(void *); void kinit(void); +int get_freemem(void); // log.c void initlog(int, struct superblock*); @@ -84,6 +91,7 @@ int pipewrite(struct pipe*, uint64, int); void printf(char*, ...); void panic(char*) __attribute__((noreturn)); void printfinit(void); +void backtrace(void); // proc.c int cpuid(void); @@ -110,6 +118,8 @@ void yield(void); int either_copyout(int user_dst, uint64 dst, void *src, uint64 len); 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); // swtch.S void swtch(struct context*, struct context*); @@ -149,6 +159,9 @@ int fetchstr(uint64, char*, int); int fetchaddr(uint64, uint64*); void syscall(); +// sysinfo.c +int sys_info(uint64); + // trap.c extern uint ticks; void trapinit(void); @@ -181,6 +194,7 @@ uint64 walkaddr(pagetable_t, uint64); int copyout(pagetable_t, uint64, char *, uint64); int copyin(pagetable_t, char *, uint64, uint64); int copyinstr(pagetable_t, char *, uint64, uint64); +void vmprint(pagetable_t); // plic.c void plicinit(void); |