summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/confdefs.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-10-25 10:12:39 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-10-29 10:33:37 +0100
commitfe7aefd516baf9d44003ce47d9379a310ac4050e (patch)
treeb8807eb5eb534889ec532f8b1f1e6db529ee4ab1 /cpukit/include/rtems/confdefs.h
parentposix: Provide shared memory objects by default (diff)
downloadrtems-fe7aefd516baf9d44003ce47d9379a310ac4050e.tar.bz2
posix: Provide message queues by default
Update #2514.
Diffstat (limited to 'cpukit/include/rtems/confdefs.h')
-rw-r--r--cpukit/include/rtems/confdefs.h52
1 files changed, 25 insertions, 27 deletions
diff --git a/cpukit/include/rtems/confdefs.h b/cpukit/include/rtems/confdefs.h
index 78a73c8c4a..c2c6fe6507 100644
--- a/cpukit/include/rtems/confdefs.h
+++ b/cpukit/include/rtems/confdefs.h
@@ -33,6 +33,7 @@
#include <rtems/score/userextimpl.h>
#include <rtems/score/wkspace.h>
#include <rtems/posix/key.h>
+#include <rtems/posix/mqueue.h>
#include <rtems/posix/semaphore.h>
#include <rtems/posix/shm.h>
@@ -1937,6 +1938,10 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
#define CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS \
rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
#endif
+ #if !defined(CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES)
+ #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES \
+ rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
+ #endif
#if !defined(CONFIGURE_MAXIMUM_POSIX_SEMAPHORES)
#define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES \
rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
@@ -1961,10 +1966,6 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
#endif
*/
- #if !defined(CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES)
- #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES \
- rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
- #endif
#endif /* RTEMS_POSIX_API */
#endif /* CONFIGURE_UNLIMITED_OBJECTS */
@@ -2310,6 +2311,22 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
/**
* This configuration parameter specifies the maximum number of
+ * POSIX API message queues.
+ */
+#ifndef CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES
+ #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES 0
+#endif
+
+/*
+ * This macro is calculated to specify the memory required for
+ * POSIX API message queues.
+ */
+#define _CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(_message_queues) \
+ _Configure_POSIX_Named_Object_RAM( \
+ _message_queues, sizeof(POSIX_Message_queue_Control) )
+
+/**
+ * This configuration parameter specifies the maximum number of
* POSIX API semaphores.
*/
#ifndef CONFIGURE_MAXIMUM_POSIX_SEMAPHORES
@@ -2345,8 +2362,6 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
#ifdef RTEMS_POSIX_API
#include <sys/types.h>
#include <signal.h>
- #include <mqueue.h>
- #include <rtems/posix/mqueue.h>
#include <rtems/posix/psignal.h>
#include <rtems/posix/pthread.h>
#include <rtems/posix/threadsup.h>
@@ -2391,22 +2406,6 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
_Configure_From_workspace( \
(_queued_signals) * (sizeof(POSIX_signals_Siginfo_node)) )
- /**
- * This configuration parameter specifies the maximum number of
- * POSIX API message queues.
- */
- #ifndef CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES
- #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES 0
- #endif
-
- /*
- * This macro is calculated to specify the memory required for
- * POSIX API message queues.
- */
- #define _CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(_message_queues) \
- _Configure_POSIX_Named_Object_RAM( \
- _message_queues, sizeof(POSIX_Message_queue_Control) )
-
#ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE
#ifndef CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE
#ifndef CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT
@@ -2545,8 +2544,6 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
#define _CONFIGURE_MEMORY_FOR_POSIX \
(_CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS( \
CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS) + \
- _CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES( \
- CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES) + \
_CONFIGURE_MEMORY_FOR_POSIX_TIMERS(CONFIGURE_MAXIMUM_POSIX_TIMERS))
#else
/*
@@ -2705,6 +2702,8 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
_CONFIGURE_MEMORY_FOR_POSIX_KEYS( \
_CONFIGURE_POSIX_KEYS, \
CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS ) + \
+ _CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES( \
+ CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES) + \
_CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES( \
CONFIGURE_MAXIMUM_POSIX_SEMAPHORES) + \
_CONFIGURE_MEMORY_FOR_POSIX_SHMS( \
@@ -3211,8 +3210,8 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
#ifdef RTEMS_POSIX_API
uint32_t POSIX_TIMERS;
uint32_t POSIX_QUEUED_SIGNALS;
- uint32_t POSIX_MESSAGE_QUEUES;
#endif
+ uint32_t POSIX_MESSAGE_QUEUES;
uint32_t POSIX_SEMAPHORES;
uint32_t POSIX_SHMS;
@@ -3259,9 +3258,9 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
_CONFIGURE_MEMORY_FOR_POSIX_TIMERS( CONFIGURE_MAXIMUM_POSIX_TIMERS ),
_CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS(
CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS ),
+#endif
_CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(
CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES ),
-#endif
_CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES( CONFIGURE_MAXIMUM_POSIX_SEMAPHORES ),
_CONFIGURE_MEMORY_FOR_POSIX_SHMS( CONFIGURE_MAXIMUM_POSIX_SHMS ),
@@ -3327,7 +3326,6 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
#if ((CONFIGURE_MAXIMUM_POSIX_THREADS != 0) || \
(CONFIGURE_MAXIMUM_POSIX_TIMERS != 0) || \
(CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS != 0) || \
- (CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES != 0) || \
defined(CONFIGURE_POSIX_INIT_THREAD_TABLE))
#error "CONFIGURATION ERROR: POSIX API support not configured!!"
#endif