summaryrefslogtreecommitdiffstats
path: root/cpukit/posix
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/posix')
-rw-r--r--cpukit/posix/include/rtems/posix/ptimer.h7
-rw-r--r--cpukit/posix/include/rtems/posix/timerimpl.h9
-rw-r--r--cpukit/posix/src/ptimer.c11
3 files changed, 11 insertions, 16 deletions
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
@@ -36,13 +36,6 @@ extern "C" {
#include <rtems/posix/config.h>
/**
- * @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
*/
int timer_create(
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
@@ -51,13 +51,6 @@ extern "C" {
#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
*
* This is the operation that is run when a timer expires.
@@ -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 <unistd.h>
+#include <rtems/sysinit.h>
#include <rtems/rtems/status.h>
#include <rtems/rtems/types.h>
#include <rtems/rtems/timer.h>
@@ -44,6 +45,8 @@
#include <rtems/posix/timerimpl.h>
+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
+);