summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/confdefs.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2019-12-07 12:06:01 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2019-12-11 09:05:07 +0100
commit4686554260a89ab1127d0583d5636df4174bc813 (patch)
treea4abd059baddd1bd17b30d30dda15e2b7d579617 /cpukit/include/rtems/confdefs.h
parentrtems: Optimize semaphore control block (diff)
downloadrtems-4686554260a89ab1127d0583d5636df4174bc813.tar.bz2
rtems: Simplify semaphore configuration
The MrsP semaphore implementation predates the addition of self-contained synchronization objects. At this time, the potential memory reduction was justified considering the more complex configuration and additional use of the workspace. With the availability of self-contained synchronization options, e.g. POSIX mutexes, this is no longer justified. Memory constrained applications should use the self-contained synchronization objects. Remove the CONFIGURE_MAXIMUM_MRSP_SEMAPHORES configuration option. This has only an impact on applications which use SMP and a large number of scheduler instances. Update #3833.
Diffstat (limited to 'cpukit/include/rtems/confdefs.h')
-rw-r--r--cpukit/include/rtems/confdefs.h26
1 files changed, 8 insertions, 18 deletions
diff --git a/cpukit/include/rtems/confdefs.h b/cpukit/include/rtems/confdefs.h
index cbcd1f98c2..3f949b2cfa 100644
--- a/cpukit/include/rtems/confdefs.h
+++ b/cpukit/include/rtems/confdefs.h
@@ -2000,22 +2000,6 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
#define CONFIGURE_MAXIMUM_SEMAPHORES 0
#endif
-/*
- * This macro is calculated to specify the memory required for
- * Classic API Semaphores using MRSP. This is only available in
- * SMP configurations.
- */
-#if !defined(RTEMS_SMP) || \
- !defined(CONFIGURE_MAXIMUM_MRSP_SEMAPHORES)
- #define _CONFIGURE_MEMORY_FOR_MRSP_SEMAPHORES 0
-#else
- #define _CONFIGURE_MEMORY_FOR_MRSP_SEMAPHORES \
- CONFIGURE_MAXIMUM_MRSP_SEMAPHORES * \
- _Configure_From_workspace( \
- RTEMS_ARRAY_SIZE(_Scheduler_Table) * sizeof(Priority_Control) \
- )
-#endif
-
#ifndef CONFIGURE_MAXIMUM_MESSAGE_QUEUES
/**
* This configuration parameter specifies the maximum number of
@@ -2502,7 +2486,6 @@ struct _reent *__getreent(void)
_CONFIGURE_TASKS, _CONFIGURE_TASKS) + \
_CONFIGURE_MEMORY_FOR_TASKS( \
_CONFIGURE_POSIX_THREADS, _CONFIGURE_POSIX_THREADS) + \
- _CONFIGURE_MEMORY_FOR_MRSP_SEMAPHORES + \
_CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES( \
CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES) + \
_CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES( \
@@ -2786,7 +2769,10 @@ struct _reent *__getreent(void)
#endif
#if CONFIGURE_MAXIMUM_SEMAPHORES > 0
- SEMAPHORE_INFORMATION_DEFINE( CONFIGURE_MAXIMUM_SEMAPHORES );
+ SEMAPHORE_INFORMATION_DEFINE(
+ CONFIGURE_MAXIMUM_SEMAPHORES,
+ _CONFIGURE_SCHEDULER_COUNT
+ );
#endif
#if _CONFIGURE_TIMERS > 0
@@ -3171,6 +3157,10 @@ struct _reent *__getreent(void)
#warning "The CONFIGURE_NUMBER_OF_TERMIOS_PORTS configuration option is obsolete since RTEMS 5.1"
#endif
+#ifdef CONFIGURE_MAXIMUM_MRSP_SEMAPHORES
+ #warning "The CONFIGURE_MAXIMUM_MRSP_SEMAPHORES configuration option is obsolete since RTEMS 5.1"
+#endif
+
#ifdef CONFIGURE_MAXIMUM_POSIX_BARRIERS
#warning "The CONFIGURE_MAXIMUM_POSIX_BARRIERS configuration option is obsolete since RTEMS 5.1"
#endif