crashes failing to find my_tcb
Brought to you by:
cybersys
I dont know if this list is still used but this may
help someone...
In taskActivate the pthread id is filled in as the
pthread is created as below
pthread_create((&tcb->pthrid.......
I believe this causes the new pthread to run before the
thread id is entered into the tcb. If a system is
heavily loaded (or I found under gdb) this may cause
errors where a task tries to find its own tcb and crashes.
an elastoplast is to put the following code into
task_wrapper to ensure the tcb is correct before the task
runs
tcb = (v2pthread_cb_t *)arg;
if (tcb->pthrid != pthread_self())
{
tcb->pthrid=pthread_self();
printf("!FIXED ONE!\n");
}
Steve