File indexing completed on 2025-05-11 08:24:26
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038 #ifdef HAVE_CONFIG_H
0039 #include "config.h"
0040 #endif
0041
0042 #include <rtems/score/objectimpl.h>
0043 #include <rtems/score/address.h>
0044 #include <rtems/score/chainimpl.h>
0045 #include <rtems/score/sysstate.h>
0046
0047 void _Objects_Initialize_information(
0048 Objects_Information *information
0049 )
0050 {
0051 Objects_Id maximum_id;
0052 Objects_Id api_class_and_node;
0053 Objects_Maximum maximum;
0054 Objects_Maximum index;
0055 Chain_Node *head;
0056 Chain_Node *tail;
0057 Chain_Node *current;
0058 Objects_Control *next;
0059
0060 maximum_id = information->maximum_id;
0061
0062 #if defined(RTEMS_MULTIPROCESSING)
0063 maximum_id &= ~OBJECTS_NODE_MASK;
0064 maximum_id |= _Objects_Local_node << OBJECTS_NODE_START_BIT;
0065 information->maximum_id = maximum_id;
0066 #endif
0067
0068 maximum = _Objects_Get_index( maximum_id );
0069 api_class_and_node = maximum_id & ~OBJECTS_INDEX_MASK;
0070
0071
0072
0073
0074 _Assert( _Objects_Get_API( maximum_id ) <= OBJECTS_APIS_LAST );
0075 _Objects_Information_table[ _Objects_Get_API( maximum_id ) ]
0076 [ _Objects_Get_class( maximum_id ) ] = information;
0077
0078 head = _Chain_Head( &information->Inactive );
0079 tail = _Chain_Tail( &information->Inactive );
0080 current = head;
0081 next = information->initial_objects;
0082
0083 head->previous = NULL;
0084
0085 for ( index = OBJECTS_INDEX_MINIMUM; index <= maximum ; ++index ) {
0086 current->next = &next->Node;
0087 next->Node.previous = current;
0088 current = &next->Node;
0089 next->id = api_class_and_node | ( index << OBJECTS_INDEX_START_BIT );
0090 next = _Addresses_Add_offset( next, information->object_size );
0091 }
0092
0093 current->next = tail;
0094 tail->previous = current;
0095 }