① Difference between sns_tex and ref_tex
② uITRON implementation of sns_tex
BOOL sns_tex()
{
/* if there is not running task, return TRUE */
if (task running is just idle task)
return TRUE;
Otherwise, take the TCB of whoever executing this task
Enter critical section
If exception handler is not defined at all
Exit critical section and return TRUE;
If exception is disabled
Exit critical section and return TRUE;
otherwise
Exit critical section and return FALSE;
}
③ uITRON implementation of ref_tex
ER ref_tex(ID tskid, T_RTEX *pk_rtex)
{
Sanity check on arguments
Enter critical section
If the task is in the dormant state or task exception handling
routine is not defined
Exit critical section and return E_OBJ
Assign the texstat field with the exception enable/disable status
Assign the pndptn field with exception pending pattern
Exit critical section and return E_OK
}
Exception handler a dog in my house..
sns_tex() returns only the disable state of task exception handler. But, ref_tex() returns the enable/status of task exception and pending exception pattern.
② uITRON implementation of sns_tex
BOOL sns_tex()
{
/* if there is not running task, return TRUE */
if (task running is just idle task)
return TRUE;
Otherwise, take the TCB of whoever executing this task
Enter critical section
If exception handler is not defined at all
Exit critical section and return TRUE;
If exception is disabled
Exit critical section and return TRUE;
otherwise
Exit critical section and return FALSE;
}
③ uITRON implementation of ref_tex
ER ref_tex(ID tskid, T_RTEX *pk_rtex)
{
Sanity check on arguments
Enter critical section
If the task is in the dormant state or task exception handling
routine is not defined
Exit critical section and return E_OBJ
Assign the texstat field with the exception enable/disable status
Assign the pndptn field with exception pending pattern
Exit critical section and return E_OK
}
Exception handler a dog in my house..
No comments:
Post a Comment