From 21275b58a5a69c3c838082ffc8a7a3641f32ea9a Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 22 Nov 2018 19:14:51 +0100 Subject: score: Static Objects_Information initialization Statically allocate the objects information together with the initial set of objects either via . Provide default object informations with zero objects via librtemscpu.a. This greatly simplifies the workspace size estimate. RTEMS applications which do not use the unlimited objects option are easier to debug since all objects reside now in statically allocated objects of the right types. Close #3621. --- cpukit/rtems/src/regioncreate.c | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) (limited to 'cpukit/rtems/src/regioncreate.c') diff --git a/cpukit/rtems/src/regioncreate.c b/cpukit/rtems/src/regioncreate.c index 05df1dec5a..3d6215cdb1 100644 --- a/cpukit/rtems/src/regioncreate.c +++ b/cpukit/rtems/src/regioncreate.c @@ -23,26 +23,7 @@ #include #include #include - -/* - * rtems_region_create - * - * This directive creates a region of physical contiguous memory area - * from which variable sized segments can be allocated. - * - * Input parameters: - * name - user defined region name - * starting_address - physical start address of region - * length - physical length in bytes - * page_size - page size in bytes - * attribute_set - region attributes - * id - address of region id to set - * - * Output parameters: - * id - region id - * RTEMS_SUCCESSFUL - if successful - * error code - if unsuccessful - */ +#include rtems_status_code rtems_region_create( rtems_name name, @@ -104,3 +85,14 @@ rtems_status_code rtems_region_create( return return_status; } + +static void _Region_Manager_initialization( void ) +{ + _Objects_Initialize_information( &_Region_Information ); +} + +RTEMS_SYSINIT_ITEM( + _Region_Manager_initialization, + RTEMS_SYSINIT_CLASSIC_REGION, + RTEMS_SYSINIT_ORDER_MIDDLE +); -- cgit v1.2.3