diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-12-14 16:29:19 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-02-03 10:00:55 +0100 |
commit | f4fee4778e9ab8a61c00fdb34a6d2e49f2e0b2ce (patch) | |
tree | 2f409f40cb334be89f68803eaa7627f89ec413c9 /cpukit/posix | |
parent | Optional POSIX Cleanup initialization (diff) | |
download | rtems-f4fee4778e9ab8a61c00fdb34a6d2e49f2e0b2ce.tar.bz2 |
Optional POSIX Condition Variable initialization
Update #2408.
Diffstat (limited to 'cpukit/posix')
-rw-r--r-- | cpukit/posix/include/rtems/posix/condimpl.h | 9 | ||||
-rw-r--r-- | cpukit/posix/src/cond.c | 11 |
2 files changed, 11 insertions, 9 deletions
diff --git a/cpukit/posix/include/rtems/posix/condimpl.h b/cpukit/posix/include/rtems/posix/condimpl.h index 7def0f852a..789d3e8658 100644 --- a/cpukit/posix/include/rtems/posix/condimpl.h +++ b/cpukit/posix/include/rtems/posix/condimpl.h @@ -36,7 +36,7 @@ extern "C" { * The following defines the information control block used to manage * this class of objects. */ -POSIX_EXTERN Objects_Information _POSIX_Condition_variables_Information; +extern Objects_Information _POSIX_Condition_variables_Information; /** * The default condition variable attributes structure. @@ -44,13 +44,6 @@ POSIX_EXTERN Objects_Information _POSIX_Condition_variables_Information; extern const pthread_condattr_t _POSIX_Condition_variables_Default_attributes; /** - * @brief POSIX Condition Variable Manager Initialization - * - * This routine performs the initialization necessary for this manager. - */ -void _POSIX_Condition_variables_Manager_initialization(void); - -/** * @brief POSIX Condition Variable Allocate * * This function allocates a condition variable control block from diff --git a/cpukit/posix/src/cond.c b/cpukit/posix/src/cond.c index 5ce12d5220..d0ce8a613a 100644 --- a/cpukit/posix/src/cond.c +++ b/cpukit/posix/src/cond.c @@ -24,10 +24,13 @@ #include <rtems/system.h> #include <rtems/config.h> +#include <rtems/sysinit.h> #include <rtems/score/watchdog.h> #include <rtems/posix/condimpl.h> #include <rtems/posix/muteximpl.h> +Objects_Information _POSIX_Condition_variables_Information; + /* * _POSIX_Condition_variables_Manager_initialization * @@ -39,7 +42,7 @@ * Output parameters: NONE */ -void _POSIX_Condition_variables_Manager_initialization(void) +static void _POSIX_Condition_variables_Manager_initialization(void) { _Objects_Initialize_information( &_POSIX_Condition_variables_Information, /* object information table */ @@ -58,3 +61,9 @@ void _POSIX_Condition_variables_Manager_initialization(void) #endif ); } + +RTEMS_SYSINIT_ITEM( + _POSIX_Condition_variables_Manager_initialization, + RTEMS_SYSINIT_POSIX_CONDITION_VARIABLE, + RTEMS_SYSINIT_ORDER_MIDDLE +); |