b61c2547b8
initialize 2nd cpu's idt
36 lines
341 B
C
36 lines
341 B
C
int
|
|
fork()
|
|
{
|
|
asm("mov $1, %eax");
|
|
asm("int $48");
|
|
}
|
|
|
|
void
|
|
cons_putc(int c)
|
|
{
|
|
asm("mov $4, %eax");
|
|
asm("int $48");
|
|
}
|
|
|
|
int
|
|
puts(char *s)
|
|
{
|
|
int i;
|
|
|
|
for(i = 0; s[i]; i++)
|
|
cons_putc(s[i]);
|
|
return i;
|
|
}
|
|
|
|
main()
|
|
{
|
|
int pid;
|
|
pid = fork();
|
|
if(pid == 0){
|
|
cons_putc('C');
|
|
} else {
|
|
cons_putc('P');
|
|
}
|
|
while(1)
|
|
;
|
|
}
|