diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-12-14 16:34:50 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-02-03 10:00:55 +0100 |
commit | 2189b3e963f7e43e9fc577ab4f24c952cef5b08e (patch) | |
tree | c8766c8417fcb06105f4e9736b6eeeb0974d315f /cpukit/posix | |
parent | Optional POSIX Message Queue initialization (diff) | |
download | rtems-2189b3e963f7e43e9fc577ab4f24c952cef5b08e.tar.bz2 |
Optional POSIX Semaphore initialization
Update #2408.
Diffstat (limited to 'cpukit/posix')
-rw-r--r-- | cpukit/posix/include/rtems/posix/semaphoreimpl.h | 9 | ||||
-rw-r--r-- | cpukit/posix/src/semaphore.c | 11 |
2 files changed, 11 insertions, 9 deletions
diff --git a/cpukit/posix/include/rtems/posix/semaphoreimpl.h b/cpukit/posix/include/rtems/posix/semaphoreimpl.h index eeea51c488..fe5ee44034 100644 --- a/cpukit/posix/include/rtems/posix/semaphoreimpl.h +++ b/cpukit/posix/include/rtems/posix/semaphoreimpl.h @@ -33,7 +33,7 @@ extern "C" { * This defines the information control block used to manage * this class of objects. */ -POSIX_EXTERN Objects_Information _POSIX_Semaphore_Information; +extern Objects_Information _POSIX_Semaphore_Information; /** * This defines the mapping from Score status codes to POSIX return codes. @@ -41,13 +41,6 @@ POSIX_EXTERN Objects_Information _POSIX_Semaphore_Information; extern const int _POSIX_Semaphore_Return_codes[CORE_SEMAPHORE_STATUS_LAST + 1]; -/** - * @brief POSIX Semaphore Manager Initialization - * - * This routine performs the initialization necessary for this manager. - */ -void _POSIX_Semaphore_Manager_initialization(void); - RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control * _POSIX_Semaphore_Allocate_unprotected( void ) { diff --git a/cpukit/posix/src/semaphore.c b/cpukit/posix/src/semaphore.c index 5830373d3a..db3ae0c2b5 100644 --- a/cpukit/posix/src/semaphore.c +++ b/cpukit/posix/src/semaphore.c @@ -28,9 +28,12 @@ #include <rtems/system.h> #include <rtems/config.h> +#include <rtems/sysinit.h> #include <rtems/posix/semaphoreimpl.h> #include <rtems/seterr.h> +Objects_Information _POSIX_Semaphore_Information; + /* * _POSIX_Semaphore_Manager_initialization * @@ -41,7 +44,7 @@ * Output parameters: NONE */ -void _POSIX_Semaphore_Manager_initialization(void) +static void _POSIX_Semaphore_Manager_initialization(void) { _Objects_Initialize_information( &_POSIX_Semaphore_Information, /* object information table */ @@ -60,3 +63,9 @@ void _POSIX_Semaphore_Manager_initialization(void) #endif ); } + +RTEMS_SYSINIT_ITEM( + _POSIX_Semaphore_Manager_initialization, + RTEMS_SYSINIT_POSIX_SEMAPHORE, + RTEMS_SYSINIT_ORDER_MIDDLE +); |