- 20 -
3.3 Object
The object operated by the service call of a semaphore, a task, etc. is called an "object." An object is identified by the ID
number
3.3.1
The specification method of the object in a service call
Each task is identified by the ID number internally in MR100.
For example, the system says, "Start the task having the task ID number 1."
However, if a task number is directly written in a program, the resultant program would be very low in readability. If, for
instance, the following is entered in a program, the programmer is constantly required to know what the No. 2 task is.
act_tsk(2);
Further, if this program is viewed by another person, he/she does not understand at a glance what the No. 2 task is. To avoid
such inconvenience, the MR100 provides means of specifying the task by name (function or symbol name).
The program named "configurator cfg100 ,"which is supplied with the MR100, then automatically converts the task name
to the task ID number. This task identification system is schematized in Figure 3.14.
ID number
Name
Real-time OS
Program
Configurator
sta_tsk(Task name)
Starting the task
having the designated
ID number
Figure 3.14 Task Identification
act_tsk(ID_task);
This example specifies that a task corresponding to "ID_task" be invoked.
It should also be noted that task name-to-ID number conversion is effected at the time of program generation. Therefore,
the processing speed does not decrease due to this conversion feature.
Содержание Emulator System M3T-MR100
Страница 3: ...M3T MR100 4 V 1 00 User s Manual User s Manual Rev 1 00 2007 09 Real time OS for R32C 100 Series...
Страница 6: ......
Страница 14: ......
Страница 16: ...xii...
Страница 18: ......
Страница 78: ......
Страница 242: ......
Страница 269: ...253 235 entry_address alm2 236 name ID_alm2 237 exinf 0x12345678 238 239 240 241 242 End of Configuration 243...
Страница 279: ...263...
Страница 290: ......
Страница 294: ......
Страница 304: ...288...
Страница 306: ...1753 Shimonumabe Nakahara ku Kawasaki shi Kanagawa 211 8668 Japan M3T MR100 4 V 1 00 REJ10J1523 0100 User s Manual...