PxTaskSuspend_Pxhnd()

Prevent a task from being scheduled (handler service).

APPLIES TO

8.2.0

SYNOPSIS
PxError_t PxTaskSuspend_Pxhnd(PxTask_t TaskId);
ARGUMENTS
TaskId

Task to be suspended

RETURN VALUES
  • PXROS error code

ERROR CODES

PXERR_ACCESS_RIGHT

the calling task has not the right to suspend other tasks

PXERR_GLOBAL_ILLEGAL_CORE

the requested task is not on the same core

PXERR_TASK_ILLRDYFUN

invalid ready function detected

PXERR_TASK_ILLTASK

TaskId is not a valid task object

DESCRIPTION

PxTaskSuspend_Pxhnd suspends 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 by PxTaskResume. This function can only be called from handler.

Note the PxTaskSuspend_Pxhnd() is functionally identical to PxTaskSuspendEvents_Hnd().

SEE ALSO
USAGE
#include "pxdef.h"

PxError_t err = PxTaskSuspend_Pxhnd(TaskId);

if (err != PXERR_NOERROR) {
    // Report error
}