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/score/include/rtems/score/todimpl.h | |
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/score/include/rtems/score/todimpl.h')
-rw-r--r-- | cpukit/score/include/rtems/score/todimpl.h | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/cpukit/score/include/rtems/score/todimpl.h b/cpukit/score/include/rtems/score/todimpl.h index e3a1a8f58c..b00ab6cca2 100644 --- a/cpukit/score/include/rtems/score/todimpl.h +++ b/cpukit/score/include/rtems/score/todimpl.h @@ -19,7 +19,6 @@ #define _RTEMS_SCORE_TODIMPL_H #include <rtems/score/tod.h> -#include <rtems/score/apimutex.h> #include <rtems/score/timestamp.h> #include <rtems/score/timecounterimpl.h> #include <rtems/score/watchdog.h> @@ -143,16 +142,13 @@ typedef struct { extern TOD_Control _TOD; -static inline void _TOD_Lock( void ) -{ - /* FIXME: https://devel.rtems.org/ticket/2630 */ - _API_Mutex_Lock( _Once_Mutex ); -} +void _TOD_Lock( void ); -static inline void _TOD_Unlock( void ) -{ - _API_Mutex_Unlock( _Once_Mutex ); -} +void _TOD_Unlock( void ); + +#if defined(RTEMS_DEBUG) +bool _TOD_Is_owner( void ); +#endif static inline void _TOD_Acquire( ISR_lock_Context *lock_context ) { |