Hello,
I'm trying to use the Vxworks skin, with RealTime task. But I've got a problem during a task test.
I would like to configure the scheduler in Round Robin mode and launch a first blocking task, and a second one, with an higher priority, which kill the first one after a while. But the first task never give back the CPU and my computer freeze !
You can give a look to my program:
#include "vxworks/vxworks.h" #define CLK_RATE 50 #define SSEXEC_SYSCLKRATE 1000 #define SSEXEC_TIMESLICE 10 #include "CTime.h" static int IdTasktTest ; static int IdTasktDestroy ; void TaskTest(void) { while(1); //CTime::sleepInMs(1000); // Work without any problem if I put this ligne. } void Destroy() { CTime::sleepInMs(4000); taskDelete(IdTasktTest); printf("TasktTest Destroy\n"); } int CreateTask(void) { IdTasktTest = taskSpawn ( "tTest",20, VX_FP_TASK,0x5000, (FUNCPTR)TaskTest, 0,0,0,0,0,0,0,0,0,0 ); IdTasktDestroy = taskSpawn ("Destroy",1, VX_FP_TASK, 0x5000,(FUNCPTR)Destroy, 0,0,0,0,0,0,0,0,0,0 ); if ((IdTasktTest==ERROR)||(IdTasktDestroy==ERROR)) { printf("Error in taskSpawn on tTest or watchdog \n"); return ERROR; } printf("sortie de taskSpawn on Test \n"); return OK; } int root_thread_init (void) { xnpod_activate_rr(SSEXEC_TIMESLICE); CreateTask(); return 0; } void root_thread_exit (void) { taskDelete(IdTasktDestroy); }Any Ideas ?
Thanks in advance.
Brieuc THOMAS
_______________________________________________ Xenomai-help mailing list Xenomai-help@gna.org https://mail.gna.org/listinfo/xenomai-help