diff options
author | Mole Shang <[email protected]> | 2024-02-19 14:10:32 +0800 |
---|---|---|
committer | Mole Shang <[email protected]> | 2024-02-19 14:36:21 +0800 |
commit | d86118fc80267649b4791c8c0c72ebd60edf1ef2 (patch) | |
tree | b792b617b4df80a5803a9c1164d0e3fdfe9cfe31 /kernel/defs.h | |
parent | b20ef9d0210fd7d9403acde1857eed1b9880c0b2 (diff) | |
parent | 0cf897cbe05fd8485162619db4244f4159d0eb52 (diff) | |
download | xv6-labs-d86118fc80267649b4791c8c0c72ebd60edf1ef2.tar.gz xv6-labs-d86118fc80267649b4791c8c0c72ebd60edf1ef2.tar.bz2 xv6-labs-d86118fc80267649b4791c8c0c72ebd60edf1ef2.zip |
Merge branch 'fs' into mmap
Conflicts:
.gitignore
Makefile
conf/lab.mk
kernel/defs.h
user/user.h
Diffstat (limited to 'kernel/defs.h')
-rw-r--r-- | kernel/defs.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/kernel/defs.h b/kernel/defs.h index 859fc41..541c97e 100644 --- a/kernel/defs.h +++ b/kernel/defs.h @@ -16,6 +16,7 @@ struct superblock; struct mbuf; struct sock; #endif +struct sysinfo; // bio.c void binit(void); @@ -30,6 +31,9 @@ void consoleinit(void); void consoleintr(int); void consputc(int); +// cow.c +int cow_handler(pagetable_t, uint64); + // exec.c int exec(char*, char**); @@ -68,9 +72,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*); @@ -88,6 +95,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); @@ -114,6 +122,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*); @@ -125,9 +135,7 @@ void initlock(struct spinlock*, char*); void release(struct spinlock*); void push_off(void); void pop_off(void); -#if defined(LAB_LOCK) || defined(LAB_NET) int atomic_read4(int *addr); -#endif #ifdef LAB_LOCK void freelock(struct spinlock*); #endif @@ -155,6 +163,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); @@ -187,6 +198,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); @@ -210,14 +222,12 @@ int copyin_new(pagetable_t, char *, uint64, uint64); int copyinstr_new(pagetable_t, char *, uint64, uint64); #endif -#ifdef LAB_LOCK // stats.c void statsinit(void); void statsinc(void); // sprintf.c int snprintf(char*, int, char*, ...); -#endif #ifdef KCSAN void kcsaninit(); |