www.beck-ipc.com

@CHIP-RTOS C Library - RTOS API


RTX_Task_Priority

Read out existing and/or set a task's priority.

int RTX_Task_Priority ( int taskID, int priority);

Parameters

taskID

Task handle returned from RTX_Create_Task or RTX_Create_Task_Without_Run,
or set to zero to indicate the current task.

priority

Task priority in range 2...127 where priority 2 is high and 127 is low, or set to PRIORITY_READ_ONLY (=0x5ABC) to make no change to the task priority and only read out the existing task priority.

Return Value

non-negative, success:   Existing task priority (prior to any change)
negative, failure:   error code, such as -1 for "Invalid task ID".

Comments

Set the priority parameter to PRIORITY_READ_ONLY if you only want to read out the task's priority without making any change.

The calling tasks' priority can be read out or adjusted by setting the taskID parameter to zero.   The AMXK kernel task's priority cannot be changed.

An out of range priority value will be limited to range 2..127 inside this function.

See Also

RTOS API

This library function invokes a RTOS software interrupt. Refer to this RTOS API function's documentation for more details.

Related Topics

RTX API   Overview

Supported since or modified in @CHIP-RTOS version

    SC12SC13SC11SC1x3SC2x
    V1.20V1.20V1.20V1.05V1.00

This API List
List of C Libraries
@CHIP-RTOS Main Index


End of document