PxTaskSuspend_Pxhnd()
Prevent a task from being scheduled (handler service).
- APPLIES TO
-
1.0.0
- SYNOPSIS
-
PxError_t PxTaskSuspend_Pxhnd(PxTask_t TaskId); - ARGUMENTS
|
- RETURN VALUES
-
-
PXROS error code
-
- ERROR CODES
-
PXERR_ACCESS_RIGHTthe calling task has not the right to suspend other tasks
PXERR_GLOBAL_ILLEGAL_COREthe requested task is not on the same core
PXERR_TASK_ILLRDYFUNinvalid ready function detected
PXERR_TASK_ILLTASKTaskIdis not a valid task object - DESCRIPTION
-
PxTaskSuspend_Pxhndsuspends task, i.e., prevents task from being scheduled. If the task is waiting for a resource, the resource may eventually be delivered to task but task remains in a waiting state until resumed byPxTaskResume. This function can only be called from handler.Note the
PxTaskSuspend_Pxhnd()is functionally identical toPxTaskSuspendEvents_Hnd().
- SEE ALSO
- USAGE
-
#include "pxdef.h" PxError_t err = PxTaskSuspend_Pxhnd(TaskId); if (err != PXERR_NOERROR) { // Report error }