PxSetModebits()
Set modebits of the calling task.
- APPLIES TO
-
8.2.0
- SYNOPSIS
-
PxTmode_t PxSetModebits (PxTmode_t modebits); - ARGUMENTS
|
- RETURN VALUES
-
-
The old value of
modebits
-
- ERROR CODES
-
PXERR_ACCESS_RIGHTThe calling task does not have the right to manipulate its
modebits - DESCRIPTION
-
PxSetModebitssets the bitsmodebitsin the calling task’s task control block. This disables the corresponding mechanism. The task mode specifies, 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
-
-
modebitsmay be a combination of the following bits (V):-
PXTmodeDisableAborts -
PXTmodeDisableTimeslicing
-
-
- 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 oldmode = PxSetModebits(modebits);