forked from Imagelibrary/rtems
Statically initialize _Objects_Information_table
This commit is contained in:
@@ -61,7 +61,19 @@
|
|||||||
#include <drvmgr/drvmgr.h>
|
#include <drvmgr/drvmgr.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ];
|
static Objects_Information *
|
||||||
|
_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ];
|
||||||
|
|
||||||
|
static Objects_Information *_RTEMS_Objects[ OBJECTS_RTEMS_CLASSES_LAST + 1 ];
|
||||||
|
|
||||||
|
static Objects_Information *_POSIX_Objects[ OBJECTS_POSIX_CLASSES_LAST + 1 ];
|
||||||
|
|
||||||
|
Objects_Information **_Objects_Information_table[ OBJECTS_APIS_LAST + 1 ] = {
|
||||||
|
NULL,
|
||||||
|
&_Internal_Objects[ 0 ],
|
||||||
|
&_RTEMS_Objects[ 0 ],
|
||||||
|
&_POSIX_Objects[ 0 ]
|
||||||
|
};
|
||||||
|
|
||||||
static void rtems_initialize_data_structures(void)
|
static void rtems_initialize_data_structures(void)
|
||||||
{
|
{
|
||||||
@@ -104,11 +116,6 @@ static void rtems_initialize_data_structures(void)
|
|||||||
_User_extensions_Handler_initialization();
|
_User_extensions_Handler_initialization();
|
||||||
_ISR_Handler_initialization();
|
_ISR_Handler_initialization();
|
||||||
|
|
||||||
/*
|
|
||||||
* Initialize the internal support API and allocator Mutex
|
|
||||||
*/
|
|
||||||
_Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects;
|
|
||||||
|
|
||||||
_API_Mutex_Initialization( 2 );
|
_API_Mutex_Initialization( 2 );
|
||||||
_API_Mutex_Allocate( &_RTEMS_Allocator_Mutex );
|
_API_Mutex_Allocate( &_RTEMS_Allocator_Mutex );
|
||||||
_API_Mutex_Allocate( &_Once_Mutex );
|
_API_Mutex_Allocate( &_Once_Mutex );
|
||||||
|
|||||||
@@ -52,8 +52,6 @@ void _POSIX_Fatal_error( POSIX_Fatal_domain domain, int eno )
|
|||||||
_Terminate( INTERNAL_ERROR_POSIX_API, false, code );
|
_Terminate( INTERNAL_ERROR_POSIX_API, false, code );
|
||||||
}
|
}
|
||||||
|
|
||||||
Objects_Information *_POSIX_Objects[ OBJECTS_POSIX_CLASSES_LAST + 1 ];
|
|
||||||
|
|
||||||
void _POSIX_API_Initialize(void)
|
void _POSIX_API_Initialize(void)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@@ -63,12 +61,6 @@ void _POSIX_API_Initialize(void)
|
|||||||
* Currently, there are no none type size assumptions.
|
* Currently, there are no none type size assumptions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
|
||||||
* Install our API Object Management Table and initialize the
|
|
||||||
* various managers.
|
|
||||||
*/
|
|
||||||
_Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects;
|
|
||||||
|
|
||||||
_POSIX_Key_Manager_initialization();
|
_POSIX_Key_Manager_initialization();
|
||||||
|
|
||||||
#ifdef RTEMS_POSIX_API
|
#ifdef RTEMS_POSIX_API
|
||||||
|
|||||||
@@ -39,16 +39,8 @@
|
|||||||
#include <rtems/rtems/signalimpl.h>
|
#include <rtems/rtems/signalimpl.h>
|
||||||
#include <rtems/rtems/timerimpl.h>
|
#include <rtems/rtems/timerimpl.h>
|
||||||
|
|
||||||
Objects_Information *_RTEMS_Objects[ OBJECTS_RTEMS_CLASSES_LAST + 1 ];
|
|
||||||
|
|
||||||
void _RTEMS_API_Initialize(void)
|
void _RTEMS_API_Initialize(void)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
* Install our API Object Management Table and initialize the
|
|
||||||
* various managers.
|
|
||||||
*/
|
|
||||||
_Objects_Information_table[OBJECTS_CLASSIC_API] = _RTEMS_Objects;
|
|
||||||
|
|
||||||
_RTEMS_tasks_Manager_initialization();
|
_RTEMS_tasks_Manager_initialization();
|
||||||
_Timer_Manager_initialization();
|
_Timer_Manager_initialization();
|
||||||
_Signal_Manager_initialization();
|
_Signal_Manager_initialization();
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ SCORE_EXTERN uint16_t _Objects_Maximum_nodes;
|
|||||||
* class. From the ID, we can go to one of these information blocks,
|
* class. From the ID, we can go to one of these information blocks,
|
||||||
* and obtain a pointer to the appropriate object control block.
|
* and obtain a pointer to the appropriate object control block.
|
||||||
*/
|
*/
|
||||||
SCORE_EXTERN Objects_Information
|
extern Objects_Information
|
||||||
**_Objects_Information_table[OBJECTS_APIS_LAST + 1];
|
**_Objects_Information_table[OBJECTS_APIS_LAST + 1];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user