OST_TASK_POINTER OS_Task_GetCreated ()
This service may be called after OS_Task_Create(). It returns a pointer to the TCB of the just-created task. This pointer can be used to control one task from another (delete, pause, etc).
Before calling this service be sure that OS_Task_Create() created a task (OS_IsError() should return false).
Immediately after calling OS_Task_Create()
no
OST_TASK_POINTER |
Pointer to task's descriptor. |
OST_TASK_POINTER tp1; void Task1 (void) { for (;;) OS_Yield(); } void Task2 (void) { for (;;) { OS_Task_Pause(tp1); /*...*/ OS_Task_Continue(tp1); } } void main (void) { OS_Init(); OS_Task_Create (1, Task1); // Create Task1 if (!OS_IsError()) tp1 = OS_Task_GetCreated(); // Get descriptor OS_Task_Create (5, Task2); // Create Task2 OS_Run(); }