Renesas 70 Manual De Usuario

Descargar
Página de 162
Chapter 3 Introduction to MR308 
   
- 25 - 
3.3.4 
Task Control Block(TCB) 
The task control block (TCB) refers to the data block that the real-time OS uses for individual task status, priority, 
and other control purposes. 
The MR308 manages the following task information as the task control block 
• 
Task connection pointer 
Task connection pointer used for ready queue formation or other purposes.   
• 
Task status 
• 
Task priority 
• 
Task register information and other data
  storage stack area pointer(current SP register value)   
• 
Wake-up counter 
Task wake-up request storage area.   
• 
Time-out counter or wait flag pattern 
When a task is in a time-out wait state, the remaining wait time is stored; if in a flag wait state, the 
flag's wait pattern is stored in this area.   
• 
Flag wait mode 
This is a wait mode during eventflag wait.   
• 
Timer queue connection pointer 
This area is used when using the timeout function. This area stores the task connection pointer used 
when constructing the timer queue. 
• 
Flag wait pattern 
This area is used when using the timeout function. 
This area stores the flag wait pattern when using the eventflag wait service call with the timeout func-
tion (twai_flg). No flag wait pattern area is allocated when the eventflag is not used. 
• 
Startup request counter 
This is the area in which task startup requests are accumulated. 
• 
Extended task information 
Extended task information that was set during task generation is stored in this area. 
 
The task control block is schematized in Figure 3.17
. 
                                                      
26
  Called the task context