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.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/cpukit/score/src/coretodset.c b/cpukit/score/src/coretodset.c
index fa6407cfaf..787c263643 100644
--- a/cpukit/score/src/coretodset.c
+++ b/cpukit/score/src/coretodset.c
@@ -41,9 +41,29 @@ void _TOD_Set(
cpu_count = _SMP_Get_processor_count();
for ( cpu_index = 0 ; cpu_index < cpu_count ; ++cpu_index ) {
- Per_CPU_Control *cpu = _Per_CPU_Get_by_index( cpu_index );
+ Per_CPU_Control *cpu;
+ Watchdog_Header *header;
+ ISR_lock_Context lock_context;
+ Watchdog_Control *first;
- _Watchdog_Per_CPU_tickle_realtime( cpu, tod_as_ticks );
+ cpu = _Per_CPU_Get_by_index( cpu_index );
+ header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_REALTIME ];
+
+ _ISR_lock_ISR_disable_and_acquire( &cpu->Watchdog.Lock, &lock_context );
+
+ first = _Watchdog_Header_first( header );
+
+ if ( first != NULL ) {
+ _Watchdog_Tickle(
+ header,
+ first,
+ tod_as_ticks,
+ &cpu->Watchdog.Lock,
+ &lock_context
+ );
+ }
+
+ _ISR_lock_Release_and_ISR_enable( &cpu->Watchdog.Lock, &lock_context );
}
_TOD.is_set = true;