summaryrefslogtreecommitdiffstats
path: root/cpukit/sapi/src
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2014-03-04 15:54:12 -0600
committerJoel Sherrill <joel.sherrill@oarcorp.com>2014-03-07 13:21:11 -0600
commite6c87f78724743bc74a38678f93ed579ace840f2 (patch)
treedce3962edb00574dade0c8caf837cd85b9607831 /cpukit/sapi/src
parentRemove trailing whitespace in previous patches (diff)
downloadrtems-e6c87f78724743bc74a38678f93ed579ace840f2.tar.bz2
POSIX keys now enabled in all configurations.
Formerly POSIX keys were only enabled when POSIX threads were enabled. Because they are a truly safe alternative to per-task variables in an SMP system, they are being enabled in all configurations.
Diffstat (limited to 'cpukit/sapi/src')
-rw-r--r--cpukit/sapi/src/exinit.c14
-rw-r--r--cpukit/sapi/src/posixapi.c40
2 files changed, 26 insertions, 28 deletions
diff --git a/cpukit/sapi/src/exinit.c b/cpukit/sapi/src/exinit.c
index 73ebea9929..077a092b0e 100644
--- a/cpukit/sapi/src/exinit.c
+++ b/cpukit/sapi/src/exinit.c
@@ -1,15 +1,13 @@
/**
* @file
*
- * @brief Device Driver Initialization Functions
+ * @brief Initialization Manager
*
* @ingroup ClassicRTEMS
*/
/*
- * Initialization Manager
- *
- * COPYRIGHT (c) 1989-2011.
+ * COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -57,9 +55,7 @@
#include <rtems/rtems/rtemsapi.h>
-#ifdef RTEMS_POSIX_API
- #include <rtems/posix/posixapi.h>
-#endif
+#include <rtems/posix/posixapi.h>
Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ];
@@ -147,9 +143,7 @@ void rtems_initialize_data_structures(void)
_IO_Manager_initialization();
- #ifdef RTEMS_POSIX_API
- _POSIX_API_Initialize();
- #endif
+ _POSIX_API_Initialize();
_System_state_Set( SYSTEM_STATE_BEFORE_MULTITASKING );
diff --git a/cpukit/sapi/src/posixapi.c b/cpukit/sapi/src/posixapi.c
index bcf807eab2..de502ec88d 100644
--- a/cpukit/sapi/src/posixapi.c
+++ b/cpukit/sapi/src/posixapi.c
@@ -7,7 +7,7 @@
*/
/*
- * COPYRIGHT (c) 1989-2010.
+ * COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -22,19 +22,21 @@
#define POSIX_API_INIT
#include <rtems/system.h> /* include this before checking RTEMS_POSIX_API */
-#ifdef RTEMS_POSIX_API
+#include <rtems/config.h>
+#include <rtems/posix/keyimpl.h>
+#include <rtems/posix/posixapi.h>
+
+#ifdef RTEMS_POSIX_API
#include <sys/types.h>
#include <mqueue.h>
#include <rtems/config.h>
#include <rtems/posix/barrierimpl.h>
-#include <rtems/posix/condimpl.h>
#include <rtems/posix/config.h>
-#include <rtems/posix/keyimpl.h>
+#include <rtems/posix/condimpl.h>
#include <rtems/posix/mqueueimpl.h>
#include <rtems/posix/muteximpl.h>
#include <rtems/posix/onceimpl.h>
-#include <rtems/posix/posixapi.h>
#include <rtems/posix/priorityimpl.h>
#include <rtems/posix/psignalimpl.h>
#include <rtems/posix/pthreadimpl.h>
@@ -43,6 +45,7 @@
#include <rtems/posix/semaphoreimpl.h>
#include <rtems/posix/spinlockimpl.h>
#include <rtems/posix/time.h>
+#endif
void _POSIX_Fatal_error( POSIX_Fatal_domain domain, int eno )
{
@@ -68,18 +71,19 @@ void _POSIX_API_Initialize(void)
*/
_Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects;
- _POSIX_signals_Manager_Initialization();
- _POSIX_Threads_Manager_initialization();
- _POSIX_Condition_variables_Manager_initialization();
_POSIX_Key_Manager_initialization();
- _POSIX_Mutex_Manager_initialization();
- _POSIX_Message_queue_Manager_initialization();
- _POSIX_Once_Manager_initialization();
- _POSIX_Semaphore_Manager_initialization();
- _POSIX_Timer_Manager_initialization();
- _POSIX_Barrier_Manager_initialization();
- _POSIX_RWLock_Manager_initialization();
- _POSIX_Spinlock_Manager_initialization();
-}
-#endif
+ #ifdef RTEMS_POSIX_API
+ _POSIX_signals_Manager_Initialization();
+ _POSIX_Threads_Manager_initialization();
+ _POSIX_Condition_variables_Manager_initialization();
+ _POSIX_Mutex_Manager_initialization();
+ _POSIX_Message_queue_Manager_initialization();
+ _POSIX_Once_Manager_initialization();
+ _POSIX_Semaphore_Manager_initialization();
+ _POSIX_Timer_Manager_initialization();
+ _POSIX_Barrier_Manager_initialization();
+ _POSIX_RWLock_Manager_initialization();
+ _POSIX_Spinlock_Manager_initialization();
+ #endif
+}