/* * Test Userland Thread Scheduler (UTS) suite for KSE. */ int main(void) { int i; runq_init(&runq1); init_uts(&data1, &runq1); init_uts(&data2, &runq1); thread_start(&data1, aaaa, '+'); thread_start(&data1, aaaa, '-'); start_uts(&data1, 0); start_uts(&data2, 0); // start second ksegrp runq_init(&runq2); init_uts(&data3, &runq2); init_uts(&data4, &runq2); thread_start(&data3, newkse, 0); thread_start(&data3, aaaa, '*'); thread_start(&data3, aaaa, '.'); start_uts(&data3, 1); for (i = 0;1;i++) { // if (i < 1000) // thread_start(aaaa, 'a' + (i % 26)); pchar('A' + (i % 26)); nano(5); } pstr("\n** main() exiting **\n"); return (EX_OK); }
int main(void) { runq_init(&runq1); init_uts(&data1, &runq1); thread_start(&data1, deadloop, 0); thread_start(&data1, deadloop, 0); thread_start(&data1, deadloop, 0); start_uts(&data1, 0); pause(); pstr("\n** main() exiting **\n"); return (EX_OK); }
static void newkse(int v) { start_uts(&data4, 0); }