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
21 lines
275 B
ArmAsm
21 lines
275 B
ArmAsm
#include "syscall.h"
|
|
#include "traps.h"
|
|
|
|
#define STUB(name) \
|
|
.globl name; \
|
|
name: \
|
|
movl $SYS_ ## name, %eax; \
|
|
int $T_SYSCALL; \
|
|
ret
|
|
|
|
STUB(fork)
|
|
STUB(exit)
|
|
STUB(wait)
|
|
STUB(cons_putc)
|
|
STUB(pipe)
|
|
STUB(read)
|
|
STUB(write)
|
|
STUB(close)
|
|
STUB(block)
|
|
STUB(kill)
|
|
STUB(panic)
|