PxSetModebits()

Set modebits of the calling task.

APPLIES TO

8.2.0

SYNOPSIS
PxTmode_t PxSetModebits (PxTmode_t modebits);
ARGUMENTS
modebits

The new modebits

RETURN VALUES
  • The old value of modebits

ERROR CODES

PXERR_ACCESS_RIGHT

The calling task does not have the right to manipulate its modebits

DESCRIPTION

PxSetModebits sets the bits modebits in 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 following modebits:

  • PXTmodeDisableAborts to control the abort mechanism

  • PXTmodeDisableTimeslicing to control the timeslice mechanism

IMPLEMENTATION GUIDELINES
Before call
  • modebits may be a combination of the following bits (V):

    • PXTmodeDisableAborts

    • PXTmodeDisableTimeslicing

After call
  • PxGetError must 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);