/* Proof that mipsi is now preemptive! */ #include #include "minithread.h" #include "synch.h" #include "mtio.h" void printInts() { int i=0; while(1) { printf("%d",i++); fflush(stdout); } } void printChars() { while (1) { printf("a"); fflush(stdout); } } void main() { minithread_fork((proc_t)printChars,NULL); minithread_fork((proc_t)printInts,NULL); while(1) { printf("\nmain\n"); minithread_yield(); } }