From 76a8328945bdefafc255d9589d4dcc371e1a73ef Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 14 Dec 2015 16:39:10 +0100 Subject: Optional POSIX RWLock initialization Update #2408. --- cpukit/posix/include/rtems/posix/rwlockimpl.h | 10 +--------- cpukit/posix/src/prwlock.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 10 deletions(-) (limited to 'cpukit/posix') 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 #include +#include #include +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 +); -- cgit v1.2.3