mirror of
https://git.rtems.org/rtems-docs/
synced 2025-05-17 18:51:43 +08:00
parent
fdaef809d5
commit
92745a4baa
@ -94,19 +94,14 @@ name:
|
|||||||
Object IDs
|
Object IDs
|
||||||
----------
|
----------
|
||||||
|
|
||||||
An object ID is a unique unsigned integer value which uniquely identifies an
|
An object ID is a unique 32-bit unsigned integer value which uniquely
|
||||||
object instance. Object IDs are passed as arguments to many directives in
|
identifies an object instance. Object IDs are passed as arguments to many
|
||||||
RTEMS and RTEMS translates the ID to an internal object pointer. The efficient
|
directives in RTEMS and RTEMS translates the ID to an internal object pointer.
|
||||||
manipulation of object IDs is critical to the performance of RTEMS services.
|
The efficient manipulation of object IDs is critical to the performance of some
|
||||||
Because of this, there are two object Id formats defined. Each target
|
RTEMS services.
|
||||||
architecture specifies which format it will use. There is a thirty-two bit
|
|
||||||
format which is used for most of the supported architectures and supports
|
|
||||||
multiprocessor configurations. There is also a simpler sixteen bit format
|
|
||||||
which is appropriate for smaller target architectures and does not support
|
|
||||||
multiprocessor configurations.
|
|
||||||
|
|
||||||
Thirty-Two Object ID Format
|
Object ID Format
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
The thirty-two bit format for an object ID is composed of four parts: API,
|
The thirty-two bit format for an object ID is composed of four parts: API,
|
||||||
object class, node, and index. The data type ``rtems_id`` is used to store
|
object class, node, and index. The data type ``rtems_id`` is used to store
|
||||||
@ -129,29 +124,6 @@ sixteen bits form an identifier within a particular object type. This
|
|||||||
identifier, called the object index, ranges in value from 1 to the maximum
|
identifier, called the object index, ranges in value from 1 to the maximum
|
||||||
number of objects configured for this object type.
|
number of objects configured for this object type.
|
||||||
|
|
||||||
Sixteen Bit Object ID Format
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
The sixteen bit format for an object ID is composed of three parts: API, object
|
|
||||||
class, and index. The data type ``rtems_id`` is used to store object IDs.
|
|
||||||
|
|
||||||
.. code-block:: c
|
|
||||||
|
|
||||||
15 11 10 8 7 0
|
|
||||||
+---------+-------+--------------+
|
|
||||||
| | | |
|
|
||||||
| Class | API | Index |
|
|
||||||
| | | |
|
|
||||||
+---------+-------+--------------+
|
|
||||||
|
|
||||||
The sixteen-bit format is designed to be as similar as possible to the
|
|
||||||
thrity-two bit format. The differences are limited to the eliminatation of the
|
|
||||||
node field and reduction of the index field from sixteen-bits to 8-bits. Thus
|
|
||||||
the sixteen bit format only supports up to 255 object instances per API/Class
|
|
||||||
combination and single processor systems. As this format is typically utilized
|
|
||||||
by sixteen-bit processors with limited address space, this is more than enough
|
|
||||||
object instances.
|
|
||||||
|
|
||||||
Object ID Description
|
Object ID Description
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user