46bbd72f3e
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
5 lines
66 B
C
5 lines
66 B
C
struct spinlock {
|
|
unsigned int locked;
|
|
unsigned locker_pc;
|
|
};
|