diff options
author | rtm <rtm> | 2006-06-26 20:31:52 +0000 |
---|---|---|
committer | rtm <rtm> | 2006-06-26 20:31:52 +0000 |
commit | b61c2547b8b489cab16984c0940a1cb6593a2a3d (patch) | |
tree | 3ff33920d08b6221ec32b7aaff583a32edc8001b /user1.c | |
parent | a44ee3cde8b55c314410210b9f3076797b9925fc (diff) | |
download | xv6-labs-b61c2547b8b489cab16984c0940a1cb6593a2a3d.tar.gz xv6-labs-b61c2547b8b489cab16984c0940a1cb6593a2a3d.tar.bz2 xv6-labs-b61c2547b8b489cab16984c0940a1cb6593a2a3d.zip |
system call return values
initialize 2nd cpu's idt
Diffstat (limited to 'user1.c')
-rw-r--r-- | user1.c | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -1,4 +1,4 @@ -void +int fork() { asm("mov $1, %eax"); @@ -12,19 +12,25 @@ cons_putc(int c) asm("int $48"); } -void +int puts(char *s) { int i; for(i = 0; s[i]; i++) cons_putc(s[i]); + return i; } main() { - // fork(); - puts("hello!\n"); + int pid; + pid = fork(); + if(pid == 0){ + cons_putc('C'); + } else { + cons_putc('P'); + } while(1) ; } |