summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/clockgetuptimeseconds.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/rtems/src/clockgetuptimeseconds.c')
-rw-r--r--cpukit/rtems/src/clockgetuptimeseconds.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/cpukit/rtems/src/clockgetuptimeseconds.c b/cpukit/rtems/src/clockgetuptimeseconds.c
index c1dfbf3785..3b597acaa8 100644
--- a/cpukit/rtems/src/clockgetuptimeseconds.c
+++ b/cpukit/rtems/src/clockgetuptimeseconds.c
@@ -24,18 +24,18 @@
#endif
#include <rtems/rtems/clock.h>
-#include <rtems/score/isrlevel.h>
#include <rtems/score/todimpl.h>
time_t rtems_clock_get_uptime_seconds( void )
{
- Timestamp_Control snapshot_as_timestamp;
- struct timespec snapshot_as_timespec;
- ISR_Level level;
+ TOD_Control *tod = &_TOD;
+ Timestamp_Control snapshot_as_timestamp;
+ struct timespec snapshot_as_timespec;
+ ISR_Level level;
- _ISR_Disable( level );
- snapshot_as_timestamp = _TOD.uptime;
- _ISR_Enable( level );
+ _TOD_Acquire( tod, level );
+ snapshot_as_timestamp = tod->uptime;
+ _TOD_Release( tod, level );
_Timestamp_To_timespec( &snapshot_as_timestamp, &snapshot_as_timespec );