I set two static threads in BIOS, names of which are StackTest and mycalcu(priorities are both 5). In the StackTest, I setup a dynamic task mytcp(the code is: hData=TaskCreate(mytcp,"mytcp",OS_TASKPRINORM,0X1400,0,0,0);).
I hope the executive order is: StackTest, mytcp and mycalcu. But when the program is running, the executive order is: StackTest, mycalcu and mytcp. Though I can adjust the executive order to my hope by SEM(SEM_ipost,SEM_pend), but why there is no SEM, mycalcu will execute after StackTest. Because I think mytcp is set in StackTest, so it should execute after StackTest. Does somebody know the reason?