diff options
Diffstat (limited to 'cpukit/score/src/coretod.c')
-rw-r--r-- | cpukit/score/src/coretod.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/cpukit/score/src/coretod.c b/cpukit/score/src/coretod.c index 1df1b4ed86..cd8428c15d 100644 --- a/cpukit/score/src/coretod.c +++ b/cpukit/score/src/coretod.c @@ -19,5 +19,25 @@ #endif #include <rtems/score/todimpl.h> +#include <rtems/score/apimutex.h> TOD_Control _TOD; + +static API_Mutex_Control _TOD_Mutex = API_MUTEX_INITIALIZER( "_TOD" ); + +void _TOD_Lock( void ) +{ + _API_Mutex_Lock( &_TOD_Mutex ); +} + +void _TOD_Unlock( void ) +{ + _API_Mutex_Unlock( &_TOD_Mutex ); +} + +#if defined(RTEMS_DEBUG) +bool _TOD_Is_owner( void ) +{ + return _API_Mutex_Is_owner( &_TOD_Mutex ); +} +#endif |