From 8b4e2a08febc8b957b44732dbc7da831479a0005 Mon Sep 17 00:00:00 2001 From: rtm Date: Sat, 1 Jul 2006 21:26:01 +0000 Subject: swtch saves callee-saved registers swtch idles on per-CPU stack, not on calling process's stack fix pipe bugs usertest.c tests pipes, fork, exit, close --- ulib.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'ulib.c') diff --git a/ulib.c b/ulib.c index 694501e..d99acdd 100644 --- a/ulib.c +++ b/ulib.c @@ -5,6 +5,13 @@ fork() asm("int $48"); } +int +exit() +{ + asm("mov $2, %eax"); + asm("int $48"); +} + void cons_putc(int c) { @@ -42,3 +49,10 @@ write(int fd, char *buf, int n) asm("mov $6, %eax"); asm("int $48"); } + +int +close(int fd) +{ + asm("mov $8, %eax"); + asm("int $48"); +} -- cgit v1.2.3