diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-11-29 06:23:27 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-12-04 10:53:39 +0100 |
commit | 6c2b8a4b35536a5f99ba1ef91139485b011dafc1 (patch) | |
tree | b1ab330104094ec83051c932c4d5cb9e653a4568 /cpukit/sapi | |
parent | ada/sp09: Fix timer server test case (diff) | |
download | rtems-6c2b8a4b35536a5f99ba1ef91139485b011dafc1.tar.bz2 |
score: Use self-contained API mutex
Use a self-contained recursive mutex for API_Mutex_Control. The API
mutexes are protected against asynchronous thread cancellation.
Add dedicated mutexes for libatomic and TOD.
Close #2629.
Close #2630.
Diffstat (limited to 'cpukit/sapi')
-rwxr-xr-x | cpukit/sapi/include/confdefs.h | 10 | ||||
-rw-r--r-- | cpukit/sapi/src/exinit.c | 9 |
2 files changed, 1 insertions, 18 deletions
diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h index ca4ee47b2b..8066d9a426 100755 --- a/cpukit/sapi/include/confdefs.h +++ b/cpukit/sapi/include/confdefs.h @@ -2794,13 +2794,6 @@ extern rtems_initialization_tasks_table Initialization_tasks[]; #endif /** - * RTEMS uses two instance of an internal mutex class. This accounts - * for these mutexes. - */ -#define _CONFIGURE_API_MUTEX_MEMORY \ - _Configure_Object_RAM(2, sizeof(API_Mutex_Control)) - -/** * This calculates the amount of memory reserved for the IDLE tasks. * In an SMP system, each CPU core has its own idle task. */ @@ -2829,8 +2822,7 @@ extern rtems_initialization_tasks_table Initialization_tasks[]; */ #define _CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD \ ( _CONFIGURE_MEMORY_FOR_INTERNAL_TASKS + \ - _CONFIGURE_INTERRUPT_STACK_MEMORY + \ - _CONFIGURE_API_MUTEX_MEMORY \ + _CONFIGURE_INTERRUPT_STACK_MEMORY \ ) /** diff --git a/cpukit/sapi/src/exinit.c b/cpukit/sapi/src/exinit.c index ed269d5566..6ec5a7662e 100644 --- a/cpukit/sapi/src/exinit.c +++ b/cpukit/sapi/src/exinit.c @@ -27,7 +27,6 @@ #include <rtems/sysinit.h> #include <rtems/score/sysstate.h> -#include <rtems/score/apimutex.h> #include <rtems/score/copyrt.h> #include <rtems/score/heap.h> #include <rtems/score/interr.h> @@ -59,10 +58,6 @@ _Objects_Information_table[ OBJECTS_APIS_LAST + 1 ] = { &_POSIX_Objects[ 0 ] }; -API_Mutex_Control *_RTEMS_Allocator_Mutex; - -API_Mutex_Control *_Once_Mutex; - static void rtems_initialize_data_structures(void) { /* @@ -83,10 +78,6 @@ static void rtems_initialize_data_structures(void) _ISR_Handler_initialization(); - _API_Mutex_Initialization( 2 ); - _API_Mutex_Allocate( &_RTEMS_Allocator_Mutex ); - _API_Mutex_Allocate( &_Once_Mutex ); - _Thread_Handler_initialization(); _Scheduler_Handler_initialization(); |