summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/coretodset.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/src/coretodset.c')
-rw-r--r--cpukit/score/src/coretodset.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/cpukit/score/src/coretodset.c b/cpukit/score/src/coretodset.c
index e11f47c904..f1d2e36eb0 100644
--- a/cpukit/score/src/coretodset.c
+++ b/cpukit/score/src/coretodset.c
@@ -19,11 +19,12 @@
#endif
#include <rtems/score/todimpl.h>
-#include <rtems/score/threaddispatch.h>
+#include <rtems/score/assert.h>
#include <rtems/score/watchdogimpl.h>
void _TOD_Set(
- const Timestamp_Control *tod_as_timestamp
+ const Timestamp_Control *tod_as_timestamp,
+ ISR_lock_Context *lock_context
)
{
struct timespec tod_as_timespec;
@@ -31,12 +32,11 @@ void _TOD_Set(
uint32_t cpu_count;
uint32_t cpu_index;
- _Timestamp_To_timespec( tod_as_timestamp, &tod_as_timespec );
-
- _Thread_Disable_dispatch();
+ _Assert( _API_Mutex_Is_owner( _Once_Mutex ) );
- _Timecounter_Set_clock( &tod_as_timespec );
+ _Timecounter_Set_clock( tod_as_timestamp, lock_context );
+ _Timestamp_To_timespec( tod_as_timestamp, &tod_as_timespec );
tod_as_ticks = _Watchdog_Ticks_from_timespec( &tod_as_timespec );
cpu_count = _SMP_Get_processor_count();
@@ -47,6 +47,4 @@ void _TOD_Set(
}
_TOD.is_set = true;
-
- _Thread_Enable_dispatch();
}