Keil Logo

Single-Tasking Programs

Both embedded and standard C programs start execution with the main C function. In an embedded application, main is usually implemented as an endless loop and can be thought of as a single task which is executed continuously. For example:

void main (void)
{
while (1)               /* repeat forever */
  {
  do_something ();      /* execute the do_something 'task' */
  }
}

In this example, the do_something function can be thought of as a single task. Since there is only one task that executes, there is no need for multitasking capability or a multitasking operating system.

  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.