Available Languages?:

OSA : OS_Task_GetPriority

char OS_Task_GetPriority (OST_TASK_POINTER tp)

Returns priority of task.

Before calling this service you should be sure that variable tp was initialized.

The macro this_task or the service OS_Task_GetCur() can be used to perform this operation on the current task.

Call allowed:

Only in task


tp Pointer to task descriptor (OST_TASK_POINTER)


char Task priority


void Task (void)
    char prio;
    for (;;) {
        // Increase importance of current task
        prio = OS_Task_GetPriority (this_task);
        if (prio) OS_Task_SetPriority(this_task, --prio);

Old style name


See also

en/osa/ref/allservices/os_task_getpriority.txt · Last modified: 07.10.2010 13:58 (external edit)
Creative Commons License Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki