Service call, Figure 3.9 service call, 2 service call – Renesas 70 User Manual

Page 26

Advertising
background image

Chapter 3 Introduction to MR308

- 16 -

3.2 Service Call

How does the programmer use the real-time OS in a program?

First, it is necessary to call up a real-time OS function from the program in some way or other. Calling a
real-time OS function is referred to as a service call. Task activation and other processing operations can be
initiated by such a service call (See Figure 3.9).

Key input

Task

Real-time OS

Remote control

task

Service call

Task switching

Figure 3.9 Service call

This service call is realized by a function call when the application program is written in C language, as shown
below.

sta_tsk(ID_main,3);

Furthermore, if the application program is written in assembly language, it is realized by an assembler macro
call, as shown below.

sta_tsk #ID_main,#3

Advertising