00001 00007 /* Embedded XINU, Copyright (C) 2007. All rights reserved. */ 00008 00009 #include<kernel.h> 00010 #include<stdio.h> 00011 #include<proc.h> 00012 00013 extern void shell(int); 00014 00015 extern ulong cpuid; 00016 00017 int main(int argc, char **argv) 00018 { 00019 /* Associate TTY1 with second serial port. */ 00020 open(TTY1, SERIAL1); 00021 enable(); 00022 00023 /* Launch one shell process for each TTY device. */ 00024 ready(create((void *)shell, INITSTK, INITPRIO, "SHELL0", 1, CONSOLE), 00025 RESCHED_NO); 00026 ready(create((void *)shell, INITSTK, INITPRIO, "SHELL1", 1, TTY1), 00027 RESCHED_NO); 00028 00029 return 0; 00030 }