I have a task created with OSTaskCreatewName().
I'd like to use the name given to the task.
How do I access and perhaps print the name string?
If I am in any task, (not neccessarily one created with a name), how can I access the running task number, or I guess it would be the priority of the currently running task? For example if UserMain is running, how can I determine that the currently running task is the one equal to MAIN_PRIO?
Is there a way to access a list of all the running task priorities and names?
Thanks,
Henry
Access TaskName and priority# of currently running task
-
- Posts: 513
- Joined: Sat Apr 26, 2008 7:14 am
Re: Access TaskName and priority# of currently running task
To get the task priority/ID
BYTE OSTaskID( void );
We should probably add
const char * OSTaskName();
this function would look like:
const char * OSTaskName()
{
return OSTCBCur->pOSTCBName;
}
BYTE OSTaskID( void );
We should probably add
const char * OSTaskName();
this function would look like:
const char * OSTaskName()
{
return OSTCBCur->pOSTCBName;
}
Re: Access TaskName and priority# of currently running task
These functions were added to ucos.h and ucos.c they will appear in future releases.
Paul
Paul