diff options
author | rtm <rtm> | 2006-07-15 12:03:57 +0000 |
---|---|---|
committer | rtm <rtm> | 2006-07-15 12:03:57 +0000 |
commit | 46bbd72f3eeaff9386b2a90af88f3d46b458a0e8 (patch) | |
tree | 31ca93c160a10c50948329b30d27475aa6b38313 /defs.h | |
parent | d9872ffa951291fcc3f7a92c0d235b86435c5714 (diff) | |
download | xv6-labs-46bbd72f3eeaff9386b2a90af88f3d46b458a0e8.tar.gz xv6-labs-46bbd72f3eeaff9386b2a90af88f3d46b458a0e8.tar.bz2 xv6-labs-46bbd72f3eeaff9386b2a90af88f3d46b458a0e8.zip |
no more recursive locks
wakeup1() assumes you hold proc_table_lock
sleep(chan, lock) provides atomic sleep-and-release to wait for condition
ugly code in swtch/scheduler to implement new sleep
fix lots of bugs in pipes, wait, and exit
fix bugs if timer interrupt goes off in schedule()
console locks per line, not per byte
Diffstat (limited to 'defs.h')
-rw-r--r-- | defs.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -14,7 +14,8 @@ struct jmpbuf; void setupsegs(struct proc *); struct proc * newproc(void); void swtch(int); -void sleep(void *); +struct spinlock; +void sleep(void *, struct spinlock *); void wakeup(void *); void scheduler(void); void proc_exit(void); @@ -65,6 +66,8 @@ int cpu(void); struct spinlock; void acquire(struct spinlock * lock); void release(struct spinlock * lock); +void acquire1(struct spinlock * lock, struct proc *); +void release1(struct spinlock * lock, struct proc *); // main.c void load_icode(struct proc *p, uint8_t *binary, unsigned size); |