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/ratemoncreate.c | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) (limited to 'cpukit/rtems/src/ratemoncreate.c') diff --git a/cpukit/rtems/src/ratemoncreate.c b/cpukit/rtems/src/ratemoncreate.c index 12327295ac..8dd43bb9fc 100644 --- a/cpukit/rtems/src/ratemoncreate.c +++ b/cpukit/rtems/src/ratemoncreate.c @@ -18,29 +18,13 @@ #include "config.h" #endif -#include +#include #include #include #include -#include #include #include - -/* - * rtems_rate_monotonic_create - * - * This directive creates a rate monotonic timer and performs - * some initialization. - * - * Input parameters: - * name - name of period - * id - pointer to rate monotonic id - * - * Output parameters: - * id - rate monotonic id - * RTEMS_SUCCESSFUL - if successful - * error code - if unsuccessful - */ +#include rtems_status_code rtems_rate_monotonic_create( rtems_name name, @@ -84,3 +68,14 @@ rtems_status_code rtems_rate_monotonic_create( _Objects_Allocator_unlock(); return RTEMS_SUCCESSFUL; } + +static void _Rate_monotonic_Manager_initialization( void ) +{ + _Objects_Initialize_information( &_Rate_monotonic_Information ); +} + +RTEMS_SYSINIT_ITEM( + _Rate_monotonic_Manager_initialization, + RTEMS_SYSINIT_CLASSIC_RATE_MONOTONIC, + RTEMS_SYSINIT_ORDER_MIDDLE +); -- cgit v1.2.3