PxTaskGetModebits()

Return the modebits of a task.

APPLIES TO

8.2.0

SYNOPSIS
PxTmode_t PxTaskGetModebits (PxTask_t TaskId);
ARGUMENTS
TaskId

Task whose modebits are requested

RETURN VALUES
  • Modebits of given task

ERROR CODES

PXERR_GLOBAL_ILLEGAL_CORE

The requested task is not on the same core

PXERR_TASK_ILLTASK

TaskId is not a valid task object

DESCRIPTION

PxTaskGetModebits returns the modebits from the task’s task control block. The taskmode 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
  • The parameter TaskId must 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 nameserver query (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 PxTaskCoreId and the own core id with PxGetCoreId (C). Additionally the task id may be checked with PxTaskCheck() (F).

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 Tmode = PxTaskGetModebits(TaskId);