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?
Read-Only
Author Stephane Georget
Posted 21-Mar-2007 15:51 GMT
Toolset C166
RE: ARTX-166 call to get current task's priority
Stephane Georget
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;
}
}
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.