Available Languages?:

OSA : OS_Task_Define

OS_Task_Define (TaskName)

For CCS users: this service should be called from main() to tell compiler that function TaskName will be called indirectly by the scheduler.

Call allowed:

Only from main()

Parameters:

TaskName Name of C-function to be used as task

Returns:

Nothing

Example:

void Task1 (void)
{
    for (;;) OS_Yield();
}
 
void Task2 (void)
{
    for (;;) OS_Yield();
}
 
void main (void)
{
    OS_Init();
 
    OS_Task_Define(Task1);       // Tell compiler that functions Task1
    OS_Task_Define(Task2);       // and Task2 will be called by scheduler
 
    OS_Task_Create(1, Task1);    // Create task Task1 with priority 1
    OS_Task_Create(5, Task2);    // Create task Task2 with priority 5
    /*...*/
}

Old style name

-

See also

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