summaryrefslogtreecommitdiffstats
path: root/cpukit/posix
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/posix')
-rw-r--r--cpukit/posix/include/rtems/posix/rwlockimpl.h10
-rw-r--r--cpukit/posix/src/prwlock.c11
2 files changed, 11 insertions, 10 deletions
diff --git a/cpukit/posix/include/rtems/posix/rwlockimpl.h b/cpukit/posix/include/rtems/posix/rwlockimpl.h
index 46e33904dc..8c94843160 100644
--- a/cpukit/posix/include/rtems/posix/rwlockimpl.h
+++ b/cpukit/posix/include/rtems/posix/rwlockimpl.h
@@ -34,15 +34,7 @@ extern "C" {
* this class of objects.
*/
-POSIX_EXTERN Objects_Information _POSIX_RWLock_Information;
-
-/**
- * @brief POSIX RWLock manager initialization.
- *
- * This routine performs the initialization necessary for this manager.
- */
-
-void _POSIX_RWLock_Manager_initialization(void);
+extern Objects_Information _POSIX_RWLock_Information;
/**
* @brief POSIX translate core RWLock return code.
diff --git a/cpukit/posix/src/prwlock.c b/cpukit/posix/src/prwlock.c
index 05df65ae09..10c88d9bcf 100644
--- a/cpukit/posix/src/prwlock.c
+++ b/cpukit/posix/src/prwlock.c
@@ -17,13 +17,16 @@
#include <rtems/system.h>
#include <rtems/config.h>
+#include <rtems/sysinit.h>
#include <rtems/posix/rwlockimpl.h>
+Objects_Information _POSIX_RWLock_Information;
+
/**
* @brief _POSIX_RWLock_Manager_initialization
*/
-void _POSIX_RWLock_Manager_initialization(void)
+static void _POSIX_RWLock_Manager_initialization(void)
{
_Objects_Initialize_information(
&_POSIX_RWLock_Information, /* object information table */
@@ -41,3 +44,9 @@ void _POSIX_RWLock_Manager_initialization(void)
#endif
);
}
+
+RTEMS_SYSINIT_ITEM(
+ _POSIX_RWLock_Manager_initialization,
+ RTEMS_SYSINIT_POSIX_RWLOCK,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);