summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/confdefs.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2019-12-12 08:43:06 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2019-12-13 08:35:21 +0100
commit1d9f509e68a431d902cc655c85dc0601be4617b0 (patch)
tree34c7cb9da6d5a4f424d96e29fa2607e2ecd67a5a /cpukit/include/rtems/confdefs.h
parentconfig: Add _MPCI_Configuration (diff)
downloadrtems-1d9f509e68a431d902cc655c85dc0601be4617b0.tar.bz2
config: Statically allocate MP thread proxies
Update #3735.
Diffstat (limited to 'cpukit/include/rtems/confdefs.h')
-rw-r--r--cpukit/include/rtems/confdefs.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/cpukit/include/rtems/confdefs.h b/cpukit/include/rtems/confdefs.h
index 692470c024..23fa5b4e9d 100644
--- a/cpukit/include/rtems/confdefs.h
+++ b/cpukit/include/rtems/confdefs.h
@@ -1831,10 +1831,6 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
#ifndef CONFIGURE_MP_MAXIMUM_PROXIES
#define CONFIGURE_MP_MAXIMUM_PROXIES 32
#endif
- #define _CONFIGURE_MEMORY_FOR_PROXIES(_proxies) \
- _Configure_From_workspace((_proxies) \
- * (sizeof(Thread_Proxy_control) \
- + sizeof(Thread_queue_Configured_heads)))
#ifndef CONFIGURE_MP_MPCI_TABLE_POINTER
#include <mpci.h>
@@ -1850,6 +1846,18 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
#error "CONFIGURE_MP_NODE_NUMBER must be less than or equal to CONFIGURE_MP_MAXIMUM_NODES"
#endif
+ struct Thread_Configured_proxy_control {
+ Thread_Proxy_control Control;
+ Thread_queue_Configured_heads Heads;
+ };
+
+ static Thread_Configured_proxy_control _Thread_MP_Configured_proxies[
+ CONFIGURE_MP_MAXIMUM_PROXIES
+ ];
+
+ Thread_Configured_proxy_control * const _Thread_MP_Proxies =
+ &_Thread_MP_Configured_proxies[ 0 ];
+
const MPCI_Configuration _MPCI_Configuration = {
CONFIGURE_MP_NODE_NUMBER, /* local node number */
CONFIGURE_MP_MAXIMUM_NODES, /* maximum # nodes */
@@ -2391,8 +2399,7 @@ struct _reent *__getreent(void)
*/
#ifdef CONFIGURE_MP_APPLICATION
#define _CONFIGURE_MEMORY_FOR_MP \
- (_CONFIGURE_MEMORY_FOR_PROXIES(CONFIGURE_MP_MAXIMUM_PROXIES) + \
- _CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS))
+ _CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS)
#else
#define _CONFIGURE_MEMORY_FOR_MP 0
#endif