Keil Logo

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
  }
}
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.