 | RTX51 Tiny User's Guide |  |
|
|
| os_switch_task| Summary |
#include <rtx51tny.h>
char os_switch_task (void);
| | Description | The os_switch_task function allows a task to halt execution and allow another task to run. If the task calling os_switch_task is the only task ready for execution it resumes running immediately. Note - This function is part of the RTX51 Tiny Real-Time Operating System which is included only with the PK51 Professional Developer's Kit.
| | Return Value | None. | | Example |
#include <rtx51tny.h>
#include <stdio.h> /* for printf */
void long_job (void) _task_ 1
{
float f1, f2;
f1 = 0.0;
while (1)
{
f2 = log (f1);
f1 += 0.0001;
os_switch_task (); // run other tasks
}
}
|
Related Knowledgebase Articles |
|