diff options
author | Robert Morris <[email protected]> | 2024-01-02 10:04:23 -0500 |
---|---|---|
committer | Robert Morris <[email protected]> | 2024-01-02 10:04:23 -0500 |
commit | 3c0a25fc4383140b3f8bf83f5eef4cbb14062e94 (patch) | |
tree | 96b8c9987973ece5798f45534e0bd6b954fdff9d /kernel | |
parent | 3808f903625f42f58aa95e43e3caca3efaa4d118 (diff) | |
download | xv6-labs-3c0a25fc4383140b3f8bf83f5eef4cbb14062e94.tar.gz xv6-labs-3c0a25fc4383140b3f8bf83f5eef4cbb14062e94.tar.bz2 xv6-labs-3c0a25fc4383140b3f8bf83f5eef4cbb14062e94.zip |
x
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/defs.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/defs.h b/kernel/defs.h index c6fef8c..859fc41 100644 --- a/kernel/defs.h +++ b/kernel/defs.h @@ -1,3 +1,7 @@ +#ifdef LAB_MMAP +typedef unsigned long size_t; +typedef long int off_t; +#endif struct buf; struct context; struct file; @@ -121,7 +125,9 @@ 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 @@ -204,12 +210,14 @@ 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(); |