Other Parts Discussed in Thread: SYSBIOS
A timer's callback function creates a thread:
Task_Params taskParams; Task_Params_init(&taskParams); taskParams.priority = TASK_PRIO_MEDIUM; taskParams.stackSize = THREADSTACKSIZE; Task_create(timer_run, &taskParams, NULL);
This thread calls clock_gettime and within this function Hwi_disable is called which leads to an exception:
void timer_run(UArg arg0, UArg arg1) { struct timespec tm; struct tm *now; clock_gettime(CLOCK_REALTIME, &tm); ... }
In other threads I can call clock_gettime without any problems but not in this case. I supposed this is because the thread has been created by a Hwi thread? This is not logical as the creator should have no impact on the new thread but at least I have no other explanation.
Any idea how I can resolve that problem and get CLOCK_REALTIME within that thread?
Thank you and regards
Peter