[PATCH] score: Rename watchdog variants
Sebastian Huber
sebastian.huber at embedded-brains.de
Mon Oct 16 06:02:29 UTC 2017
Rename PER_CPU_WATCHDOG_RELATIVE in PER_CPU_WATCHDOG_MONOTONIC to
highlight the corresponding POSIX CLOCK_MONOTONIC.
Rename PER_CPU_WATCHDOG_ABSOLUTE in PER_CPU_WATCHDOG_REALTIME to
highlight the corresponding POSIX CLOCK_REALTIME.
Update #3117.
Update #3182.
---
cpukit/posix/include/rtems/posix/pthreadimpl.h | 2 +-
cpukit/posix/src/alarm.c | 4 ++--
cpukit/posix/src/pthread.c | 4 ++--
cpukit/posix/src/pthreadsetschedparam.c | 2 +-
cpukit/posix/src/timerdelete.c | 2 +-
cpukit/posix/src/timersettime.c | 4 ++--
cpukit/posix/src/ualarm.c | 6 +++---
cpukit/rtems/src/eventseize.c | 2 +-
cpukit/rtems/src/ratemoncancel.c | 2 +-
cpukit/rtems/src/ratemonperiod.c | 2 +-
cpukit/rtems/src/ratemontimeout.c | 2 +-
cpukit/rtems/src/taskwakeafter.c | 2 +-
cpukit/rtems/src/taskwakewhen.c | 2 +-
cpukit/rtems/src/timercreate.c | 6 +++---
cpukit/rtems/src/timerreset.c | 2 +-
cpukit/score/include/rtems/score/percpu.h | 22 +++++++++++++---------
cpukit/score/include/rtems/score/threadimpl.h | 14 +++++++-------
cpukit/score/include/rtems/score/watchdogimpl.h | 20 ++++++++++----------
cpukit/score/src/coretodset.c | 2 +-
cpukit/score/src/threadqenqueue.c | 4 ++--
cpukit/score/src/watchdogtick.c | 4 ++--
testsuites/sptests/spintrcritical08/init.c | 4 ++--
testsuites/sptests/spintrcritical09/init.c | 2 +-
23 files changed, 60 insertions(+), 56 deletions(-)
diff --git a/cpukit/posix/include/rtems/posix/pthreadimpl.h b/cpukit/posix/include/rtems/posix/pthreadimpl.h
index 055043105b..ddc5bb252b 100644
--- a/cpukit/posix/include/rtems/posix/pthreadimpl.h
+++ b/cpukit/posix/include/rtems/posix/pthreadimpl.h
@@ -56,7 +56,7 @@ RTEMS_INLINE_ROUTINE void _POSIX_Threads_Sporadic_timer_insert(
the_thread->cpu_time_budget =
_Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
- _Watchdog_Per_CPU_insert_relative(
+ _Watchdog_Per_CPU_insert_monotonic(
&api->Sporadic.Timer,
_Per_CPU_Get(),
_Timespec_To_ticks( &api->schedparam.sched_ss_repl_period )
diff --git a/cpukit/posix/src/alarm.c b/cpukit/posix/src/alarm.c
index dcc56431ea..fcf8c1569a 100644
--- a/cpukit/posix/src/alarm.c
+++ b/cpukit/posix/src/alarm.c
@@ -77,14 +77,14 @@ unsigned int alarm(
now = cpu->Watchdog.ticks;
remaining = (unsigned long) _Watchdog_Cancel(
- &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ],
+ &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ],
the_watchdog,
now
);
if ( ticks != 0 ) {
_Watchdog_Insert(
- &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ],
+ &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ],
the_watchdog,
now + ticks
);
diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c
index 107172a557..30b830cd85 100644
--- a/cpukit/posix/src/pthread.c
+++ b/cpukit/posix/src/pthread.c
@@ -69,7 +69,7 @@ void _POSIX_Threads_Sporadic_timer( Watchdog_Control *watchdog )
_Priority_Node_set_inactive( &api->Sporadic.Low_priority );
}
- _Watchdog_Per_CPU_remove_relative( &api->Sporadic.Timer );
+ _Watchdog_Per_CPU_remove_monotonic( &api->Sporadic.Timer );
_POSIX_Threads_Sporadic_timer_insert( the_thread, api );
_Thread_Wait_release( the_thread, &queue_context );
@@ -165,7 +165,7 @@ static void _POSIX_Threads_Terminate_extension( Thread_Control *executing )
_Thread_State_acquire( executing, &lock_context );
if ( api->schedpolicy == SCHED_SPORADIC ) {
- _Watchdog_Per_CPU_remove_relative( &api->Sporadic.Timer );
+ _Watchdog_Per_CPU_remove_monotonic( &api->Sporadic.Timer );
}
_Thread_State_release( executing, &lock_context );
diff --git a/cpukit/posix/src/pthreadsetschedparam.c b/cpukit/posix/src/pthreadsetschedparam.c
index 38bb0ad21e..3bd5bc4f3a 100644
--- a/cpukit/posix/src/pthreadsetschedparam.c
+++ b/cpukit/posix/src/pthreadsetschedparam.c
@@ -69,7 +69,7 @@ static int _POSIX_Set_sched_param(
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
- _Watchdog_Per_CPU_remove_relative( &api->Sporadic.Timer );
+ _Watchdog_Per_CPU_remove_monotonic( &api->Sporadic.Timer );
_Priority_Node_set_priority( &the_thread->Real_priority, core_normal_prio );
diff --git a/cpukit/posix/src/timerdelete.c b/cpukit/posix/src/timerdelete.c
index 5301a708c9..5c21e1e80d 100644
--- a/cpukit/posix/src/timerdelete.c
+++ b/cpukit/posix/src/timerdelete.c
@@ -56,7 +56,7 @@ int timer_delete(
cpu = _POSIX_Timer_Acquire_critical( ptimer, &lock_context );
ptimer->state = POSIX_TIMER_STATE_FREE;
_Watchdog_Remove(
- &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ],
+ &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ],
&ptimer->Timer
);
_POSIX_Timer_Release( cpu, &lock_context );
diff --git a/cpukit/posix/src/timersettime.c b/cpukit/posix/src/timersettime.c
index 1f98a7a08c..381e5002ce 100644
--- a/cpukit/posix/src/timersettime.c
+++ b/cpukit/posix/src/timersettime.c
@@ -42,7 +42,7 @@ static void _POSIX_Timer_Insert(
_TOD_Get( &ptimer->time );
_Watchdog_Insert(
- &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ],
+ &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ],
&ptimer->Timer,
cpu->Watchdog.ticks + ticks
);
@@ -152,7 +152,7 @@ int timer_settime(
/* Stop the timer */
_Watchdog_Remove(
- &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ],
+ &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ],
&ptimer->Timer
);
diff --git a/cpukit/posix/src/ualarm.c b/cpukit/posix/src/ualarm.c
index 86fe1b05cc..1626153651 100644
--- a/cpukit/posix/src/ualarm.c
+++ b/cpukit/posix/src/ualarm.c
@@ -55,7 +55,7 @@ static void _POSIX_signals_Ualarm_TSR( Watchdog_Control *the_watchdog )
* If the reset interval is non-zero, reschedule ourselves.
*/
if ( _POSIX_signals_Ualarm_interval != 0 ) {
- _Watchdog_Per_CPU_insert_relative(
+ _Watchdog_Per_CPU_insert_monotonic(
the_watchdog,
_Per_CPU_Get(),
_POSIX_signals_Ualarm_interval
@@ -107,7 +107,7 @@ useconds_t ualarm(
now = cpu->Watchdog.ticks;
remaining = (useconds_t) _Watchdog_Cancel(
- &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ],
+ &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ],
the_watchdog,
now
);
@@ -118,7 +118,7 @@ useconds_t ualarm(
cpu = _Per_CPU_Get();
_Watchdog_Set_CPU( the_watchdog, cpu );
_Watchdog_Insert(
- &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ],
+ &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ],
the_watchdog,
now + ticks_initial
);
diff --git a/cpukit/rtems/src/eventseize.c b/cpukit/rtems/src/eventseize.c
index 696481c2f5..76f9356800 100644
--- a/cpukit/rtems/src/eventseize.c
+++ b/cpukit/rtems/src/eventseize.c
@@ -81,7 +81,7 @@ rtems_status_code _Event_Seize(
_Thread_Wait_release_default( executing, lock_context );
if ( ticks ) {
- _Thread_Timer_insert_relative(
+ _Thread_Timer_insert_monotonic(
executing,
cpu_self,
_Thread_Timeout,
diff --git a/cpukit/rtems/src/ratemoncancel.c b/cpukit/rtems/src/ratemoncancel.c
index cb95f54408..0a88310d09 100644
--- a/cpukit/rtems/src/ratemoncancel.c
+++ b/cpukit/rtems/src/ratemoncancel.c
@@ -32,7 +32,7 @@ void _Rate_monotonic_Cancel(
_Rate_monotonic_Acquire_critical( the_period, lock_context );
- _Watchdog_Per_CPU_remove_relative( &the_period->Timer );
+ _Watchdog_Per_CPU_remove_monotonic( &the_period->Timer );
the_period->state = RATE_MONOTONIC_INACTIVE;
_Scheduler_Cancel_job(
the_period->owner,
diff --git a/cpukit/rtems/src/ratemonperiod.c b/cpukit/rtems/src/ratemonperiod.c
index efcd121584..511e46c21b 100644
--- a/cpukit/rtems/src/ratemonperiod.c
+++ b/cpukit/rtems/src/ratemonperiod.c
@@ -101,7 +101,7 @@ static void _Rate_monotonic_Release_job(
cpu_self = _Thread_Dispatch_disable_critical( lock_context );
- deadline = _Watchdog_Per_CPU_insert_relative(
+ deadline = _Watchdog_Per_CPU_insert_monotonic(
&the_period->Timer,
cpu_self,
next_length
diff --git a/cpukit/rtems/src/ratemontimeout.c b/cpukit/rtems/src/ratemontimeout.c
index 5a838fd916..b920c48789 100644
--- a/cpukit/rtems/src/ratemontimeout.c
+++ b/cpukit/rtems/src/ratemontimeout.c
@@ -36,7 +36,7 @@ static void _Rate_monotonic_Renew_deadline(
the_period->state = RATE_MONOTONIC_EXPIRED;
- deadline = _Watchdog_Per_CPU_insert_relative(
+ deadline = _Watchdog_Per_CPU_insert_monotonic(
&the_period->Timer,
_Per_CPU_Get(),
the_period->next_length
diff --git a/cpukit/rtems/src/taskwakeafter.c b/cpukit/rtems/src/taskwakeafter.c
index faf4a835cd..43bf612f61 100644
--- a/cpukit/rtems/src/taskwakeafter.c
+++ b/cpukit/rtems/src/taskwakeafter.c
@@ -41,7 +41,7 @@ rtems_status_code rtems_task_wake_after(
} else {
_Thread_Set_state( executing, STATES_WAITING_FOR_TIME );
_Thread_Wait_flags_set( executing, THREAD_WAIT_STATE_BLOCKED );
- _Thread_Timer_insert_relative(
+ _Thread_Timer_insert_monotonic(
executing,
cpu_self,
_Thread_Timeout,
diff --git a/cpukit/rtems/src/taskwakewhen.c b/cpukit/rtems/src/taskwakewhen.c
index 5d6d45afcf..ac92ea875e 100644
--- a/cpukit/rtems/src/taskwakewhen.c
+++ b/cpukit/rtems/src/taskwakewhen.c
@@ -52,7 +52,7 @@ rtems_status_code rtems_task_wake_when(
executing = _Thread_Executing;
_Thread_Set_state( executing, STATES_WAITING_FOR_TIME );
_Thread_Wait_flags_set( executing, THREAD_WAIT_STATE_BLOCKED );
- _Thread_Timer_insert_absolute(
+ _Thread_Timer_insert_realtime(
executing,
cpu_self,
_Thread_Timeout,
diff --git a/cpukit/rtems/src/timercreate.c b/cpukit/rtems/src/timercreate.c
index fc6d43e6dc..444b07cfa5 100644
--- a/cpukit/rtems/src/timercreate.c
+++ b/cpukit/rtems/src/timercreate.c
@@ -29,7 +29,7 @@
#include <rtems/score/watchdogimpl.h>
RTEMS_STATIC_ASSERT(
- PER_CPU_WATCHDOG_ABSOLUTE == TIMER_CLASS_BIT_TIME_OF_DAY,
+ PER_CPU_WATCHDOG_REALTIME == TIMER_CLASS_BIT_TIME_OF_DAY,
TIMER_CLASS_BIT_TIME_OF_DAY
);
@@ -72,13 +72,13 @@ rtems_status_code _Timer_Fire(
if ( _Timer_Is_interval_class( the_class ) ) {
_Watchdog_Insert(
- &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ],
+ &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ],
&the_timer->Ticker,
cpu->Watchdog.ticks + interval
);
} else {
_Watchdog_Insert(
- &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_ABSOLUTE ],
+ &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_REALTIME ],
&the_timer->Ticker,
_Watchdog_Ticks_from_seconds( interval )
);
diff --git a/cpukit/rtems/src/timerreset.c b/cpukit/rtems/src/timerreset.c
index a4090152b3..3718fffa66 100644
--- a/cpukit/rtems/src/timerreset.c
+++ b/cpukit/rtems/src/timerreset.c
@@ -37,7 +37,7 @@ rtems_status_code rtems_timer_reset(
if ( _Timer_Is_interval_class( the_timer->the_class ) ) {
_Timer_Cancel( cpu, the_timer );
_Watchdog_Insert(
- &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ],
+ &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ],
&the_timer->Ticker,
cpu->Watchdog.ticks + the_timer->initial
);
diff --git a/cpukit/score/include/rtems/score/percpu.h b/cpukit/score/include/rtems/score/percpu.h
index 97cb2bea15..00528b5ce3 100644
--- a/cpukit/score/include/rtems/score/percpu.h
+++ b/cpukit/score/include/rtems/score/percpu.h
@@ -248,20 +248,23 @@ typedef struct {
*/
typedef enum {
/**
- * @brief Index for relative per-CPU watchdog header.
+ * @brief Index for monotonic clock per-CPU watchdog header.
*
- * The reference time point for this header is current ticks value
- * during insert. Time is measured in clock ticks.
+ * The reference time point for the monotonic clock is the system start. The
+ * clock resolution is one system clock tick. It is used for the system
+ * clock tick based time services and the POSIX services using
+ * CLOCK_MONOTONIC.
*/
- PER_CPU_WATCHDOG_RELATIVE,
+ PER_CPU_WATCHDOG_MONOTONIC,
/**
- * @brief Index for absolute per-CPU watchdog header.
+ * @brief Index for realtime clock per-CPU watchdog header.
*
- * The reference time point for this header is the POSIX Epoch. Time is
- * measured in nanoseconds since POSIX Epoch.
+ * The reference time point for the realtime clock is the POSIX Epoch. The
+ * clock resolution is one nanosecond. It is used for the time of day
+ * services and the POSIX services using CLOCK_REALTIME.
*/
- PER_CPU_WATCHDOG_ABSOLUTE,
+ PER_CPU_WATCHDOG_REALTIME,
/**
* @brief Count of per-CPU watchdog headers.
@@ -395,7 +398,8 @@ typedef struct Per_CPU_Control {
ISR_LOCK_MEMBER( Lock )
/**
- * @brief Watchdog ticks on this processor used for relative watchdogs.
+ * @brief Watchdog ticks on this processor used for monotonic clock
+ * watchdogs.
*/
uint64_t ticks;
diff --git a/cpukit/score/include/rtems/score/threadimpl.h b/cpukit/score/include/rtems/score/threadimpl.h
index 60c7759e09..67de07e5a2 100644
--- a/cpukit/score/include/rtems/score/threadimpl.h
+++ b/cpukit/score/include/rtems/score/threadimpl.h
@@ -1853,11 +1853,11 @@ RTEMS_INLINE_ROUTINE void _Thread_Timer_initialize(
)
{
_ISR_lock_Initialize( &timer->Lock, "Thread Timer" );
- timer->header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ];
+ timer->header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ];
_Watchdog_Preinitialize( &timer->Watchdog, cpu );
}
-RTEMS_INLINE_ROUTINE void _Thread_Timer_insert_relative(
+RTEMS_INLINE_ROUTINE void _Thread_Timer_insert_monotonic(
Thread_Control *the_thread,
Per_CPU_Control *cpu,
Watchdog_Service_routine_entry routine,
@@ -1869,14 +1869,14 @@ RTEMS_INLINE_ROUTINE void _Thread_Timer_insert_relative(
_ISR_lock_ISR_disable_and_acquire( &the_thread->Timer.Lock, &lock_context );
the_thread->Timer.header =
- &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ];
+ &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ];
the_thread->Timer.Watchdog.routine = routine;
- _Watchdog_Per_CPU_insert_relative( &the_thread->Timer.Watchdog, cpu, ticks );
+ _Watchdog_Per_CPU_insert_monotonic( &the_thread->Timer.Watchdog, cpu, ticks );
_ISR_lock_Release_and_ISR_enable( &the_thread->Timer.Lock, &lock_context );
}
-RTEMS_INLINE_ROUTINE void _Thread_Timer_insert_absolute(
+RTEMS_INLINE_ROUTINE void _Thread_Timer_insert_realtime(
Thread_Control *the_thread,
Per_CPU_Control *cpu,
Watchdog_Service_routine_entry routine,
@@ -1888,9 +1888,9 @@ RTEMS_INLINE_ROUTINE void _Thread_Timer_insert_absolute(
_ISR_lock_ISR_disable_and_acquire( &the_thread->Timer.Lock, &lock_context );
the_thread->Timer.header =
- &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_ABSOLUTE ];
+ &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_REALTIME ];
the_thread->Timer.Watchdog.routine = routine;
- _Watchdog_Per_CPU_insert_absolute( &the_thread->Timer.Watchdog, cpu, expire );
+ _Watchdog_Per_CPU_insert_realtime( &the_thread->Timer.Watchdog, cpu, expire );
_ISR_lock_Release_and_ISR_enable( &the_thread->Timer.Lock, &lock_context );
}
diff --git a/cpukit/score/include/rtems/score/watchdogimpl.h b/cpukit/score/include/rtems/score/watchdogimpl.h
index f6ad05cd8a..e248bcc061 100644
--- a/cpukit/score/include/rtems/score/watchdogimpl.h
+++ b/cpukit/score/include/rtems/score/watchdogimpl.h
@@ -351,7 +351,7 @@ RTEMS_INLINE_ROUTINE void _Watchdog_Per_CPU_release_critical(
_ISR_lock_Release( &cpu->Watchdog.Lock, lock_context );
}
-RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Per_CPU_insert_relative(
+RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Per_CPU_insert_monotonic(
Watchdog_Control *the_watchdog,
Per_CPU_Control *cpu,
Watchdog_Interval ticks
@@ -361,7 +361,7 @@ RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Per_CPU_insert_relative(
Watchdog_Header *header;
uint64_t expire;
- header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ];
+ header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ];
_Watchdog_Set_CPU( the_watchdog, cpu );
@@ -372,7 +372,7 @@ RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Per_CPU_insert_relative(
return expire;
}
-RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Per_CPU_insert_absolute(
+RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Per_CPU_insert_realtime(
Watchdog_Control *the_watchdog,
Per_CPU_Control *cpu,
uint64_t expire
@@ -381,7 +381,7 @@ RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Per_CPU_insert_absolute(
ISR_lock_Context lock_context;
Watchdog_Header *header;
- header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_ABSOLUTE ];
+ header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_REALTIME ];
_Watchdog_Set_CPU( the_watchdog, cpu );
@@ -407,7 +407,7 @@ RTEMS_INLINE_ROUTINE void _Watchdog_Per_CPU_remove(
_Watchdog_Per_CPU_release_critical( cpu, &lock_context );
}
-RTEMS_INLINE_ROUTINE void _Watchdog_Per_CPU_remove_relative(
+RTEMS_INLINE_ROUTINE void _Watchdog_Per_CPU_remove_monotonic(
Watchdog_Control *the_watchdog
)
{
@@ -417,11 +417,11 @@ RTEMS_INLINE_ROUTINE void _Watchdog_Per_CPU_remove_relative(
_Watchdog_Per_CPU_remove(
the_watchdog,
cpu,
- &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ]
+ &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ]
);
}
-RTEMS_INLINE_ROUTINE void _Watchdog_Per_CPU_remove_absolute(
+RTEMS_INLINE_ROUTINE void _Watchdog_Per_CPU_remove_realtime(
Watchdog_Control *the_watchdog
)
{
@@ -431,11 +431,11 @@ RTEMS_INLINE_ROUTINE void _Watchdog_Per_CPU_remove_absolute(
_Watchdog_Per_CPU_remove(
the_watchdog,
cpu,
- &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_ABSOLUTE ]
+ &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_REALTIME ]
);
}
-RTEMS_INLINE_ROUTINE void _Watchdog_Per_CPU_tickle_absolute(
+RTEMS_INLINE_ROUTINE void _Watchdog_Per_CPU_tickle_realtime(
Per_CPU_Control *cpu,
uint64_t now
)
@@ -444,7 +444,7 @@ RTEMS_INLINE_ROUTINE void _Watchdog_Per_CPU_tickle_absolute(
_ISR_lock_ISR_disable_and_acquire( &cpu->Watchdog.Lock, &lock_context );
_Watchdog_Tickle(
- &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_ABSOLUTE ],
+ &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_REALTIME ],
now,
&cpu->Watchdog.Lock,
&lock_context
diff --git a/cpukit/score/src/coretodset.c b/cpukit/score/src/coretodset.c
index 80b0b762bd..beda8c69b8 100644
--- a/cpukit/score/src/coretodset.c
+++ b/cpukit/score/src/coretodset.c
@@ -43,7 +43,7 @@ void _TOD_Set(
for ( cpu_index = 0 ; cpu_index < cpu_count ; ++cpu_index ) {
Per_CPU_Control *cpu = _Per_CPU_Get_by_index( cpu_index );
- _Watchdog_Per_CPU_tickle_absolute( cpu, tod_as_ticks );
+ _Watchdog_Per_CPU_tickle_realtime( cpu, tod_as_ticks );
}
_TOD.is_set = true;
diff --git a/cpukit/score/src/threadqenqueue.c b/cpukit/score/src/threadqenqueue.c
index 1f5a9c1660..df1bea02cb 100644
--- a/cpukit/score/src/threadqenqueue.c
+++ b/cpukit/score/src/threadqenqueue.c
@@ -385,7 +385,7 @@ static void _Thread_queue_Timeout(
case WATCHDOG_RELATIVE:
/* A relative timeout of 0 is a special case indefinite (no) timeout */
if ( queue_context->timeout != 0 ) {
- _Thread_Timer_insert_relative(
+ _Thread_Timer_insert_monotonic(
the_thread,
cpu_self,
_Thread_Timeout,
@@ -394,7 +394,7 @@ static void _Thread_queue_Timeout(
}
break;
case WATCHDOG_ABSOLUTE:
- _Thread_Timer_insert_absolute(
+ _Thread_Timer_insert_realtime(
the_thread,
cpu_self,
_Thread_Timeout,
diff --git a/cpukit/score/src/watchdogtick.c b/cpukit/score/src/watchdogtick.c
index ab7eadcf1d..e1c5a30f8a 100644
--- a/cpukit/score/src/watchdogtick.c
+++ b/cpukit/score/src/watchdogtick.c
@@ -76,14 +76,14 @@ void _Watchdog_Tick( Per_CPU_Control *cpu )
cpu->Watchdog.ticks = ticks;
_Watchdog_Tickle(
- &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ],
+ &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ],
ticks,
&cpu->Watchdog.Lock,
&lock_context
);
_Timecounter_Getnanotime( &now );
- _Watchdog_Per_CPU_tickle_absolute(
+ _Watchdog_Per_CPU_tickle_realtime(
cpu,
_Watchdog_Ticks_from_timespec( &now )
);
diff --git a/testsuites/sptests/spintrcritical08/init.c b/testsuites/sptests/spintrcritical08/init.c
index 8d17feb365..1a7ed2d2e5 100644
--- a/testsuites/sptests/spintrcritical08/init.c
+++ b/testsuites/sptests/spintrcritical08/init.c
@@ -45,7 +45,7 @@ static rtems_timer_service_routine test_release_from_isr(
)
{
Per_CPU_Control *cpu = _Per_CPU_Get();
- Watchdog_Header *header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ];
+ Watchdog_Header *header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ];
Watchdog_Control *watchdog = (Watchdog_Control *) header->first;
if (
@@ -55,7 +55,7 @@ static rtems_timer_service_routine test_release_from_isr(
) {
Thread_Wait_flags flags = _Thread_Wait_flags_get( thread );
- _Watchdog_Per_CPU_remove_relative( watchdog );
+ _Watchdog_Per_CPU_remove_monotonic( watchdog );
rtems_test_assert( getState() == RATE_MONOTONIC_ACTIVE );
diff --git a/testsuites/sptests/spintrcritical09/init.c b/testsuites/sptests/spintrcritical09/init.c
index 44eccc7821..87c1c1aab3 100644
--- a/testsuites/sptests/spintrcritical09/init.c
+++ b/testsuites/sptests/spintrcritical09/init.c
@@ -39,7 +39,7 @@ static rtems_timer_service_routine test_release_from_isr(
)
{
Per_CPU_Control *cpu_self = _Per_CPU_Get();
- Watchdog_Header *header = &cpu_self->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ];
+ Watchdog_Header *header = &cpu_self->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ];
Watchdog_Control *watchdog = (Watchdog_Control *) header->first;
if (
--
2.12.3
More information about the devel
mailing list