diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-11-22 19:14:51 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-12-14 07:03:29 +0100 |
commit | 21275b58a5a69c3c838082ffc8a7a3641f32ea9a (patch) | |
tree | d331e17c15d71f107d0f14581a93ddf768b05813 /cpukit/rtems/src/timercreate.c | |
parent | rtems: Use object information to get config max (diff) | |
download | rtems-21275b58a5a69c3c838082ffc8a7a3641f32ea9a.tar.bz2 |
score: Static Objects_Information initialization
Statically allocate the objects information together with the initial
set of objects either via <rtems/confdefs.h>. 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.
Diffstat (limited to 'cpukit/rtems/src/timercreate.c')
-rw-r--r-- | cpukit/rtems/src/timercreate.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cpukit/rtems/src/timercreate.c b/cpukit/rtems/src/timercreate.c index 0fff3d54cf..ad47ce505a 100644 --- a/cpukit/rtems/src/timercreate.c +++ b/cpukit/rtems/src/timercreate.c @@ -27,12 +27,15 @@ #include <rtems/score/thread.h> #include <rtems/score/todimpl.h> #include <rtems/score/watchdogimpl.h> +#include <rtems/sysinit.h> RTEMS_STATIC_ASSERT( PER_CPU_WATCHDOG_REALTIME == TIMER_CLASS_BIT_TIME_OF_DAY, TIMER_CLASS_BIT_TIME_OF_DAY ); +Timer_server_Control *volatile _Timer_server; + void _Timer_Routine_adaptor( Watchdog_Control *the_watchdog ) { Timer_Control *the_timer; @@ -212,3 +215,14 @@ rtems_status_code rtems_timer_create( _Objects_Allocator_unlock(); return RTEMS_SUCCESSFUL; } + +static void _Timer_Manager_initialization( void ) +{ + _Objects_Initialize_information( &_Timer_Information ); +} + +RTEMS_SYSINIT_ITEM( + _Timer_Manager_initialization, + RTEMS_SYSINIT_CLASSIC_TIMER, + RTEMS_SYSINIT_ORDER_MIDDLE +); |