diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-12-14 16:39:10 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-02-03 10:00:56 +0100 |
commit | 76a8328945bdefafc255d9589d4dcc371e1a73ef (patch) | |
tree | e9777ee6e56ef66e47906e23532ae05f6f35316d /cpukit/posix | |
parent | Optional POSIX Barrier initialization (diff) | |
download | rtems-76a8328945bdefafc255d9589d4dcc371e1a73ef.tar.bz2 |
Optional POSIX RWLock initialization
Update #2408.
Diffstat (limited to 'cpukit/posix')
-rw-r--r-- | cpukit/posix/include/rtems/posix/rwlockimpl.h | 10 | ||||
-rw-r--r-- | cpukit/posix/src/prwlock.c | 11 |
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 +); |