/********************************************************************** Project 2: Multiprogramming Part I Simon Hawkin 98/02/28 - Based on the standard proc.c - Modified naming conventions - Enabled interrupts inside Wait() **********************************************************************/ #include #include #include "cmsc412.h" #include "keyboard.h" #include "kernel.h" #if !defined (NULL) #define NULL 0L #endif #if !defined (INT_ENABLE) #define INT_ENABLE 0x0200 #define INT_DISABLE 0x0 #endif void Wait (void); int One (int, char**); static spawnCount = 2000; /*-------------------------------------------------------------------*/ int Init( int argc , char ** argv ) { int i , /* loop index */ id , /* ID of child process */ count ; /* child process's argc */ char *argu [3]; Cprintf ("\n\t\tTEST 3a\n\nRecursive spawns.\n"); Cprintf ("Will spawn %d times\n", spawnCount ); Wait(); Cprintf ("\nThis is the init procedure\n"); Cprintf ("I have %2d arguments. They are \n" , argc ); for ( i=0 ; i