|
|
1.1 ! root 1: /* test.c - main */ ! 2: ! 3: #include <conf.h> ! 4: #include <kernel.h> ! 5: ! 6: /*------------------------------------------------------------------------ ! 7: * main -- current test routines ! 8: *------------------------------------------------------------------------ ! 9: */ ! 10: main() ! 11: { ! 12: int prhello(), proc(); ! 13: int i; ! 14: ! 15: prhello(); ! 16: for (i=0; i<10; i++) { ! 17: resume ( ! 18: create (proc, 12000, 19, "proc", 1, i) ! 19: ); ! 20: } ! 21: kprintf ("created 10 processes...\n"); ! 22: } ! 23: ! 24: prhello() ! 25: { ! 26: kprintf("hello world\n"); ! 27: } ! 28: ! 29: proc(num) ! 30: int num; ! 31: { ! 32: int i; ! 33: ! 34: for (i=0;i >= 0; i = (i+1)%3000) ! 35: if (i == 0) ! 36: kprintf ("process # %d: executing\n", num); ! 37: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.