Please note: We are aware of an issue affecting replies on the Arm Community forums, which may not be loading as expected.
We apologize for any inconvenience and appreciate your patience while we investigate and work to resolve the issue.
Thank you for your understanding.
I'm upgrading from RTX-166 to ARTX-166 and can't find the corresponding call, in ARTX-166, to get the current running task's priority.
RTX-166 had the following:
os_running_task_prio();
Does ARTX-166 have something similar?
Hello,
Maybe I should let Keil answer you on that one, however I believe that this function is not implemented with ARTX.
You should be able to write your own os_running_task_prio() function by looking directly in the OS active task list. Something like this:
#include ... a bunch of things extern ... a bunch of things too U8 os_tsk_ret_prio_self (void) { /* Get current task ID */ OS_TID CurrentTID = os_tsk_self(); if (CurrentTID != 0) { /* The OS_TID index starts at 1, whereas */ /* entries in the table start */ /* at 0. */ return os_active_TCB[CurrentTID -1]->prio; } else { return 0; } }
Steph-