PxTaskGetModebits()
Return the modebits of a task.
- APPLIES TO
-
1.0.0
- SYNOPSIS
-
PxTmode_t PxTaskGetModebits (PxTask_t TaskId); - ARGUMENTS
|
- RETURN VALUES
-
-
Modebitsof given task
-
- ERROR CODES
-
PXERR_GLOBAL_ILLEGAL_COREThe requested task is not on the same core
PXERR_TASK_ILLTASKTaskIdis not a valid task object - DESCRIPTION
-
PxTaskGetModebitsreturns themodebitsfrom the task’s task control block. Thetaskmodespecifies how a task reacts on external events. More specifically, the task mode contains the followingmodebits:-
PXTmodeDisableAbortsto control the abort mechanism -
PXTmodeDisableTimeslicingto control the timeslice mechanism
-
- IMPLEMENTATION GUIDELINES
-
- Before call
-
-
The parameter
TaskIdmust be a valid task object id. This id may be-
the calling task’s own id read by calling
PxGetId()(V) -
the return value of a
PxTaskCreate()call (V) -
the result of a
nameserverquery (V) -
part of a message sent by another task (V)
-
-
The task object must be created on the same core as the caller runs on. The creator core id can be read with the macro
PxTaskCoreIdand the own core id withPxGetCoreId(C). Additionally the task id may be checked withPxTaskCheck()(F).
-
- After call
-
-
PxGetErrormust be called to check if an error has occurred. (F)
-
- Best Practice
-
-
No restrictions.
-
- SEE ALSO
- USAGE
-
#include "pxdef.h" PxTmode_t Tmode = PxTaskGetModebits(TaskId);