
CHAPTER 2 KERNEL
User’s Manual U14833EJ2V0UM
23
2.4
Objects
The tasks (task main processing routine, task exception processing routine), semaphores, event flags, data
queues, mailboxes, mutexes, fixed-length memory pools, variable-length memory pools, memory blocks, cyclic
handlers, interrupt service routines, extended service call routines, and CPU exception handlers, which are created or
defined by the kernel and are under its management, are known as objects or kernel objects. (Note that these are
also sometimes called resources.)
2.4.1
Object control blocks
The RX4000 is equipped with data structures known as control blocks to manage the objects listed above. The
control block saves information such as the status of the object, and is therefore the (logical) substance of the object
to be processed by the kernel. Control blocks and objects exist on a one-to-one basis.
2.4.2
Object identification number
To uniquely identify the objects or control blocks in the RX4000, a number specific to each resource type is used.
The way this number is called and the range of its values differs depending on the resource. These numbers are
classified as follows.
1.
ID number
In the RX4000, each object (task, semaphore, event flag, data queue, mailbox, mutex, fixed-length memory
pool, variable-length memory pool, cyclic handler, or interrupt service routine) is accessed using an ID number.
The ID numbers are used as an index of the control block array when an object is accessed, and each object
(task, semaphore, etc.) is assigned an ID number with a unique value of 1 or higher. The maximum value (or
range of usable ID numbers) is that specified for each object in the system information table.
2.
Interrupt number
Interrupt service routines have an interrupt (source) number for specifying the interrupt source, which differs
from the ID number described above. The interrupt (source) number is a number that uniquely identifies each
interrupt source, and must be assigned by the user.
3.
Extended function code
Extended function codes are used to access extended function routines. Like an ID number, an extended
function code consists of a unique value of 1 or higher and is used as an index of the control block array. The
maximum value of the extended function code is that specified in the system information table.
4.
Handler number
When a CPU exception handler is defined, the CPU exception handler is assigned a unique value of 1 or
higher known as its handler number, which like an ID number is used as an index of the control block array.
The maximum value of this number is also specified in the system information table. Note that although the
handler number accords with the ID number in the kernel, it is necessary not only to identify the CPU exception
handler, but also to clarify its correspondence with the exception source.
5.
Address
The memory block is identified by its top address.