PxTaskGetPrio()

Get task priority.

APPLIES TO

8.2.0

SYNOPSIS
PxPrio_t PxTaskGetPrio (PxTask_t TaskId);
ARGUMENTS
TaskId

Task whose priority is asked for

RETURN VALUES
  • Priority of the given task

ERROR CODES

PXERR_TASK_ILLTASK

TaskId is not a valid task object

PXERR_GLOBAL_ILLEGAL_CORE

The requested task is not on the same core

DESCRIPTION

PxTaskGetPrio returns the current priority of the task TaskId.

IMPLEMENTATION GUIDELINES
Before call
  • The parameter task 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)

  • Additionally the task id may be checked with PxTaskCheck() (F).

After call
  • This function returns a plausible priority value (typically between 0 and 31) (C)

Best Practice
  • No restrictions.

SEE ALSO
USAGE
#include "pxdef.h"

PxPrio_t Prio = PxTaskGetPrio(TaskId);