OPERATING SYSTEM CONCEPTS 277
void task1 (void)
{
for(;;)
{
IOPORT1 ^ = 1; / *toggle IOPORT1 */
task_sleep(500);
}
}
/*
*defi ne task2
*/
void task2 (void)
{
for(;;)
{
IOPORT2 ^ = 1; /* toggle IOPORT2 */
task_sleep(1000);
}
}
e application contains two tasks: task1 and task2. Each task toggle an I/O port
and then sleep for an amount of time (task1 sleeps for 500 ms, task2 for 1000 ms).
Applications written for general purpose operating systems are distinct from the
OS; they are not part of the OS itself. In this case, the operating system binary and
application binary are diff erent.
In contrast, there is no distinction between the RTOS application and the RTOS
itself. Both are linked together to give a single binary image, which is then loaded onto ...