#include "vxWorks.h" #include "stdio.h" #include "kernelLib.h" void tTick1(void) { for(;;) { printf(" task 1!\n"); } }
void tTick2(void) { for(;;) { printf(" task 2!\n"); } }
void root(void) { int tid1, tid2; kernelTimeSlice(800); tid1 = taskSpawn("tTick1",150,0,4096,(FUNCPTR)tTick1,0,0,0,0,0,0,0,0,0,0); tid2 = taskSpawn("tTick2",150,0,4096,(FUNCPTR)tTick2,0,0,0,0,0,0,0,0,0,0); }