...
Files
os.h/os_task.c
Prototype
Code Block |
---|
CPU_BOOLEAN OSTaskSemPendAbort (OS_TCB *p_tcb,
OS_OPT opt,
OS_ERR *p_err) |
Arguments
p_tcb
is a pointer to the task for which the pend must be aborted. Note that it does not make sense to pass a NULL
pointer or the address of the calling task’s TCB since, by definition, the calling task cannot be pending.
...
- Do not call
OSTaskSemPendAbort()
from an ISR.
Example Usage
Code Block |
---|
OS_TCB CommRxTaskTCB;
void CommTask (void *p_arg)
{
OS_ERR err;
CPU_BOOLEAN aborted;
(void)&p_arg;
while (DEF_ON) {
:
:
aborted = OSTaskSemPendAbort(&CommRxTaskTCB,
OS_OPT_POST_NONE,
&err);
/* Check "err" */
:
:
}
} |