From 6c678557906cbbe73af1691e90e52911b2d00223 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 14 Dec 2015 16:36:21 +0100 Subject: Optional POSIX Timer initialization Update #2408. --- cpukit/posix/include/rtems/posix/ptimer.h | 7 ------- cpukit/posix/include/rtems/posix/timerimpl.h | 9 +-------- cpukit/posix/src/ptimer.c | 11 ++++++++++- 3 files changed, 11 insertions(+), 16 deletions(-) (limited to 'cpukit/posix') diff --git a/cpukit/posix/include/rtems/posix/ptimer.h b/cpukit/posix/include/rtems/posix/ptimer.h index 16ac2b8373..f6de4ccb57 100644 --- a/cpukit/posix/include/rtems/posix/ptimer.h +++ b/cpukit/posix/include/rtems/posix/ptimer.h @@ -35,13 +35,6 @@ extern "C" { #include -/** - * @brief POSIX Timer Manager Initialization - * - * This routine performs the initialization necessary for this manager. - */ -void _POSIX_Timer_Manager_initialization(void); - /** * @brief Create a Per-Process Timer */ diff --git a/cpukit/posix/include/rtems/posix/timerimpl.h b/cpukit/posix/include/rtems/posix/timerimpl.h index b297d3205a..8b5b42e98a 100644 --- a/cpukit/posix/include/rtems/posix/timerimpl.h +++ b/cpukit/posix/include/rtems/posix/timerimpl.h @@ -50,13 +50,6 @@ extern "C" { #error "POSIX_TIMER_RELATIVE == TIMER_ABSTIME" #endif -/** - * @brief POSIX Timer Manager Initialization - * - * This routine performs the initialization necessary for this manager. - */ -void _POSIX_Timer_Manager_initialization(void); - /** * @brief POSIX Timer Manager Timer Service Routine Helper * @@ -79,7 +72,7 @@ bool _POSIX_Timer_Insert_helper( * The following defines the information control block used to manage * this class of objects. */ -POSIX_EXTERN Objects_Information _POSIX_Timer_Information; +extern Objects_Information _POSIX_Timer_Information; /** * @brief POSIX Timer Allocate diff --git a/cpukit/posix/src/ptimer.c b/cpukit/posix/src/ptimer.c index a1e06373b8..810112ac95 100644 --- a/cpukit/posix/src/ptimer.c +++ b/cpukit/posix/src/ptimer.c @@ -33,6 +33,7 @@ /************************************/ #include +#include #include #include #include @@ -44,6 +45,8 @@ #include +Objects_Information _POSIX_Timer_Information; + /* * _POSIX_Timer_Manager_initialization * @@ -53,7 +56,7 @@ * the timers are stored */ -void _POSIX_Timer_Manager_initialization(void) +static void _POSIX_Timer_Manager_initialization(void) { _Objects_Initialize_information( &_POSIX_Timer_Information, /* object information table */ @@ -72,3 +75,9 @@ void _POSIX_Timer_Manager_initialization(void) #endif ); } + +RTEMS_SYSINIT_ITEM( + _POSIX_Timer_Manager_initialization, + RTEMS_SYSINIT_POSIX_TIMER, + RTEMS_SYSINIT_ORDER_MIDDLE +); -- cgit v1.2.3