summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-04-15 11:26:46 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-05-19 12:00:42 +0200
commit290309014c15b4eceee9f77c90eb3c81cc223f4b (patch)
tree4b9ae28399c95783e9ac5847d6a7709f980d62ad /cpukit
parentscore: Optimize _Thread_queue_Compare_priority() (diff)
downloadrtems-290309014c15b4eceee9f77c90eb3c81cc223f4b.tar.bz2
score: Add header to _Watchdog_Remove()
Add watchdog header parameter to _Watchdog_Remove() to be in line with the other operations. Add _Watchdog_Remove_ticks() and _Watchdog_Remove_seconds() for convenience. Update #2307.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/posix/src/alarm.c2
-rw-r--r--cpukit/posix/src/psignalunblockthread.c2
-rw-r--r--cpukit/posix/src/pthread.c2
-rw-r--r--cpukit/posix/src/pthreadsetschedparam.c4
-rw-r--r--cpukit/posix/src/timerdelete.c2
-rw-r--r--cpukit/posix/src/timerinserthelper.c2
-rw-r--r--cpukit/posix/src/timersettime.c2
-rw-r--r--cpukit/posix/src/ualarm.c2
-rw-r--r--cpukit/rtems/include/rtems/rtems/timerimpl.h13
-rw-r--r--cpukit/rtems/src/eventseize.c2
-rw-r--r--cpukit/rtems/src/eventsurrender.c2
-rw-r--r--cpukit/rtems/src/ratemoncancel.c2
-rw-r--r--cpukit/rtems/src/ratemondelete.c2
-rw-r--r--cpukit/rtems/src/timercancel.c3
-rw-r--r--cpukit/rtems/src/timercreate.c23
-rw-r--r--cpukit/rtems/src/timerdelete.c2
-rw-r--r--cpukit/rtems/src/timerfireafter.c2
-rw-r--r--cpukit/rtems/src/timerfirewhen.c2
-rw-r--r--cpukit/rtems/src/timerreset.c2
-rw-r--r--cpukit/rtems/src/timerserver.c19
-rw-r--r--cpukit/rtems/src/timerserverfireafter.c2
-rw-r--r--cpukit/rtems/src/timerserverfirewhen.c2
-rw-r--r--cpukit/score/include/rtems/score/mrspimpl.h2
-rw-r--r--cpukit/score/include/rtems/score/watchdogimpl.h18
-rw-r--r--cpukit/score/src/threadqenqueue.c2
-rw-r--r--cpukit/score/src/threadrestart.c4
-rw-r--r--cpukit/score/src/watchdogremove.c1
-rw-r--r--cpukit/score/src/watchdogtickle.c2
28 files changed, 92 insertions, 33 deletions
diff --git a/cpukit/posix/src/alarm.c b/cpukit/posix/src/alarm.c
index 48036617d4..6f051d7190 100644
--- a/cpukit/posix/src/alarm.c
+++ b/cpukit/posix/src/alarm.c
@@ -73,7 +73,7 @@ unsigned int alarm(
_Thread_Disable_dispatch();
- state = _Watchdog_Remove( the_timer );
+ state = _Watchdog_Remove_seconds( the_timer );
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
/*
* The stop_time and start_time fields are snapshots of ticks since
diff --git a/cpukit/posix/src/psignalunblockthread.c b/cpukit/posix/src/psignalunblockthread.c
index 1b3db68262..3b310a90b7 100644
--- a/cpukit/posix/src/psignalunblockthread.c
+++ b/cpukit/posix/src/psignalunblockthread.c
@@ -115,7 +115,7 @@ bool _POSIX_signals_Unblock_thread(
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_delaying(the_thread->current_state) ) {
- (void) _Watchdog_Remove( &the_thread->Timer );
+ _Watchdog_Remove_ticks( &the_thread->Timer );
_Thread_Unblock( the_thread );
} else {
_Thread_queue_Extract_with_proxy( the_thread );
diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c
index 4d28de536f..97882bf4cb 100644
--- a/cpukit/posix/src/pthread.c
+++ b/cpukit/posix/src/pthread.c
@@ -286,7 +286,7 @@ static void _POSIX_Threads_Terminate_extension(
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
- (void) _Watchdog_Remove( &api->Sporadic_timer );
+ _Watchdog_Remove_ticks( &api->Sporadic_timer );
_Thread_Enable_dispatch();
}
diff --git a/cpukit/posix/src/pthreadsetschedparam.c b/cpukit/posix/src/pthreadsetschedparam.c
index d5d0a5ba8a..dcb70bdec8 100644
--- a/cpukit/posix/src/pthreadsetschedparam.c
+++ b/cpukit/posix/src/pthreadsetschedparam.c
@@ -70,7 +70,7 @@ int pthread_setschedparam(
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->schedpolicy == SCHED_SPORADIC )
- (void) _Watchdog_Remove( &api->Sporadic_timer );
+ _Watchdog_Remove_ticks( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
@@ -99,7 +99,7 @@ int pthread_setschedparam(
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
- _Watchdog_Remove( &api->Sporadic_timer );
+ _Watchdog_Remove_ticks( &api->Sporadic_timer );
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
break;
}
diff --git a/cpukit/posix/src/timerdelete.c b/cpukit/posix/src/timerdelete.c
index 71b25faed9..e090be2aca 100644
--- a/cpukit/posix/src/timerdelete.c
+++ b/cpukit/posix/src/timerdelete.c
@@ -54,7 +54,7 @@ int timer_delete(
case OBJECTS_LOCAL:
_Objects_Close( &_POSIX_Timer_Information, &ptimer->Object );
ptimer->state = POSIX_TIMER_STATE_FREE;
- (void) _Watchdog_Remove( &ptimer->Timer );
+ _Watchdog_Remove_ticks( &ptimer->Timer );
_Objects_Put( &ptimer->Object );
_POSIX_Timer_Free( ptimer );
_Objects_Allocator_unlock();
diff --git a/cpukit/posix/src/timerinserthelper.c b/cpukit/posix/src/timerinserthelper.c
index 9d028350ad..4d7c3fb681 100644
--- a/cpukit/posix/src/timerinserthelper.c
+++ b/cpukit/posix/src/timerinserthelper.c
@@ -39,7 +39,7 @@ bool _POSIX_Timer_Insert_helper(
{
ISR_Level level;
- (void) _Watchdog_Remove( timer );
+ _Watchdog_Remove_ticks( timer );
_ISR_Disable( level );
/*
diff --git a/cpukit/posix/src/timersettime.c b/cpukit/posix/src/timersettime.c
index 6cc378082a..2967df6df0 100644
--- a/cpukit/posix/src/timersettime.c
+++ b/cpukit/posix/src/timersettime.c
@@ -85,7 +85,7 @@ int timer_settime(
/* First, it verifies if the timer must be stopped */
if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) {
/* Stop the timer */
- (void) _Watchdog_Remove( &ptimer->Timer );
+ _Watchdog_Remove_ticks( &ptimer->Timer );
/* The old data of the timer are returned */
if ( ovalue )
*ovalue = ptimer->timer_data;
diff --git a/cpukit/posix/src/ualarm.c b/cpukit/posix/src/ualarm.c
index d9a85e6a92..9235ef165c 100644
--- a/cpukit/posix/src/ualarm.c
+++ b/cpukit/posix/src/ualarm.c
@@ -72,7 +72,7 @@ useconds_t ualarm(
_Thread_Disable_dispatch();
- state = _Watchdog_Remove( the_timer );
+ state = _Watchdog_Remove_ticks( the_timer );
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
/*
* The stop_time and start_time fields are snapshots of ticks since
diff --git a/cpukit/rtems/include/rtems/rtems/timerimpl.h b/cpukit/rtems/include/rtems/rtems/timerimpl.h
index b695d5e2fe..4f200efb75 100644
--- a/cpukit/rtems/include/rtems/rtems/timerimpl.h
+++ b/cpukit/rtems/include/rtems/rtems/timerimpl.h
@@ -50,9 +50,9 @@ extern "C" {
typedef struct Timer_server_Control Timer_server_Control;
/**
- * @brief Method used to schedule the insertion of task based timers.
+ * @brief Method used for task based timers.
*/
-typedef void (*Timer_server_Schedule_operation)(
+typedef void (*Timer_server_Method)(
Timer_server_Control *timer_server,
Timer_Control *timer
);
@@ -84,9 +84,14 @@ struct Timer_server_Control {
Thread_Control *thread;
/**
+ * @brief The cancel method of the timer server.
+ */
+ Timer_server_Method cancel;
+
+ /**
* @brief The schedule operation method of the timer server.
*/
- Timer_server_Schedule_operation schedule_operation;
+ Timer_server_Method schedule_operation;
/**
* @brief Interval watchdogs triggered by the timer server.
@@ -220,6 +225,8 @@ RTEMS_INLINE_ROUTINE bool _Timer_Is_dormant_class (
return ( the_class == TIMER_DORMANT );
}
+void _Timer_Cancel( Timer_Control *the_timer );
+
/**@}*/
#ifdef __cplusplus
diff --git a/cpukit/rtems/src/eventseize.c b/cpukit/rtems/src/eventseize.c
index 929665641c..36b1964820 100644
--- a/cpukit/rtems/src/eventseize.c
+++ b/cpukit/rtems/src/eventseize.c
@@ -101,7 +101,7 @@ void _Event_Seize(
wait_class | THREAD_WAIT_STATE_BLOCKED
);
if ( !success ) {
- _Watchdog_Remove( &executing->Timer );
+ _Watchdog_Remove_ticks( &executing->Timer );
_Thread_Unblock( executing );
}
diff --git a/cpukit/rtems/src/eventsurrender.c b/cpukit/rtems/src/eventsurrender.c
index ba4e429f1e..e29d203f71 100644
--- a/cpukit/rtems/src/eventsurrender.c
+++ b/cpukit/rtems/src/eventsurrender.c
@@ -111,7 +111,7 @@ void _Event_Surrender(
_Thread_Lock_release_default( the_thread, lock_context );
_Giant_Acquire( cpu_self );
- _Watchdog_Remove( &the_thread->Timer );
+ _Watchdog_Remove_ticks( &the_thread->Timer );
_Thread_Unblock( the_thread );
_Giant_Release( cpu_self );
diff --git a/cpukit/rtems/src/ratemoncancel.c b/cpukit/rtems/src/ratemoncancel.c
index d4a9102955..67b230fbfc 100644
--- a/cpukit/rtems/src/ratemoncancel.c
+++ b/cpukit/rtems/src/ratemoncancel.c
@@ -38,7 +38,7 @@ rtems_status_code rtems_rate_monotonic_cancel(
_Objects_Put( &the_period->Object );
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
- (void) _Watchdog_Remove( &the_period->Timer );
+ _Watchdog_Remove_ticks( &the_period->Timer );
the_period->state = RATE_MONOTONIC_INACTIVE;
_Scheduler_Release_job( the_period->owner, 0 );
_Objects_Put( &the_period->Object );
diff --git a/cpukit/rtems/src/ratemondelete.c b/cpukit/rtems/src/ratemondelete.c
index 971ad8ef3d..77cf3fe306 100644
--- a/cpukit/rtems/src/ratemondelete.c
+++ b/cpukit/rtems/src/ratemondelete.c
@@ -37,7 +37,7 @@ rtems_status_code rtems_rate_monotonic_delete(
case OBJECTS_LOCAL:
_Scheduler_Release_job( the_period->owner, 0 );
_Objects_Close( &_Rate_monotonic_Information, &the_period->Object );
- (void) _Watchdog_Remove( &the_period->Timer );
+ _Watchdog_Remove_ticks( &the_period->Timer );
the_period->state = RATE_MONOTONIC_INACTIVE;
_Objects_Put( &the_period->Object );
_Rate_monotonic_Free( the_period );
diff --git a/cpukit/rtems/src/timercancel.c b/cpukit/rtems/src/timercancel.c
index a8ce1478da..1e737a25bb 100644
--- a/cpukit/rtems/src/timercancel.c
+++ b/cpukit/rtems/src/timercancel.c
@@ -45,8 +45,7 @@ rtems_status_code rtems_timer_cancel(
switch ( location ) {
case OBJECTS_LOCAL:
- if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
- (void) _Watchdog_Remove( &the_timer->Ticker );
+ _Timer_Cancel( the_timer );
_Objects_Put( &the_timer->Object );
return RTEMS_SUCCESSFUL;
diff --git a/cpukit/rtems/src/timercreate.c b/cpukit/rtems/src/timercreate.c
index 0b1c44bdc2..2c6d251b8a 100644
--- a/cpukit/rtems/src/timercreate.c
+++ b/cpukit/rtems/src/timercreate.c
@@ -21,10 +21,33 @@
#include <rtems/system.h>
#include <rtems/rtems/status.h>
#include <rtems/rtems/support.h>
+#include <rtems/score/assert.h>
#include <rtems/score/thread.h>
#include <rtems/rtems/timerimpl.h>
#include <rtems/score/watchdogimpl.h>
+void _Timer_Cancel( Timer_Control *the_timer )
+{
+ Timer_server_Control *timer_server;
+
+ switch ( the_timer->the_class ) {
+ case TIMER_INTERVAL:
+ _Watchdog_Remove_ticks( &the_timer->Ticker );
+ break;
+ case TIMER_TIME_OF_DAY:
+ _Watchdog_Remove_seconds( &the_timer->Ticker );
+ break;
+ case TIMER_INTERVAL_ON_TASK:
+ case TIMER_TIME_OF_DAY_ON_TASK:
+ timer_server = _Timer_server;
+ (*timer_server->cancel)( timer_server, the_timer );
+ break;
+ default:
+ _Assert( the_timer->the_class == TIMER_DORMANT );
+ break;
+ }
+}
+
rtems_status_code rtems_timer_create(
rtems_name name,
rtems_id *id
diff --git a/cpukit/rtems/src/timerdelete.c b/cpukit/rtems/src/timerdelete.c
index 19232c8096..0849ec5ba6 100644
--- a/cpukit/rtems/src/timerdelete.c
+++ b/cpukit/rtems/src/timerdelete.c
@@ -38,7 +38,7 @@ rtems_status_code rtems_timer_delete(
case OBJECTS_LOCAL:
_Objects_Close( &_Timer_Information, &the_timer->Object );
- (void) _Watchdog_Remove( &the_timer->Ticker );
+ _Timer_Cancel( the_timer );
_Objects_Put( &the_timer->Object );
_Timer_Free( the_timer );
_Objects_Allocator_unlock();
diff --git a/cpukit/rtems/src/timerfireafter.c b/cpukit/rtems/src/timerfireafter.c
index 07862cde8c..84cf46bc37 100644
--- a/cpukit/rtems/src/timerfireafter.c
+++ b/cpukit/rtems/src/timerfireafter.c
@@ -46,7 +46,7 @@ rtems_status_code rtems_timer_fire_after(
switch ( location ) {
case OBJECTS_LOCAL:
- (void) _Watchdog_Remove( &the_timer->Ticker );
+ _Timer_Cancel( the_timer );
_ISR_Disable( level );
diff --git a/cpukit/rtems/src/timerfirewhen.c b/cpukit/rtems/src/timerfirewhen.c
index 6ac7d17433..1acbaf9b8f 100644
--- a/cpukit/rtems/src/timerfirewhen.c
+++ b/cpukit/rtems/src/timerfirewhen.c
@@ -51,7 +51,7 @@ rtems_status_code rtems_timer_fire_when(
switch ( location ) {
case OBJECTS_LOCAL:
- (void) _Watchdog_Remove( &the_timer->Ticker );
+ _Timer_Cancel( the_timer );
the_timer->the_class = TIMER_TIME_OF_DAY;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_Watchdog_Insert_seconds(
diff --git a/cpukit/rtems/src/timerreset.c b/cpukit/rtems/src/timerreset.c
index 49c4925aa3..7ab172ea4f 100644
--- a/cpukit/rtems/src/timerreset.c
+++ b/cpukit/rtems/src/timerreset.c
@@ -67,7 +67,7 @@ rtems_status_code rtems_timer_reset(
return RTEMS_INCORRECT_STATE;
}
#endif
- _Watchdog_Remove( &the_timer->Ticker );
+ (*timer_server->cancel)( timer_server, the_timer );
(*timer_server->schedule_operation)( timer_server, the_timer );
} else {
/*
diff --git a/cpukit/rtems/src/timerserver.c b/cpukit/rtems/src/timerserver.c
index 25191e43d7..15cbdfd59f 100644
--- a/cpukit/rtems/src/timerserver.c
+++ b/cpukit/rtems/src/timerserver.c
@@ -38,7 +38,7 @@ static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
- _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
+ _Watchdog_Remove_ticks( &ts->Interval_watchdogs.System_watchdog );
}
static void _Timer_server_Reset_interval_system_watchdog(
@@ -71,7 +71,7 @@ static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
- _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
+ _Watchdog_Remove_seconds( &ts->TOD_watchdogs.System_watchdog );
}
static void _Timer_server_Reset_tod_system_watchdog(
@@ -210,6 +210,18 @@ static void _Timer_server_Insert_timer_and_make_snapshot(
_Thread_Enable_dispatch();
}
+static void _Timer_server_Cancel_method(
+ Timer_server_Control *ts,
+ Timer_Control *timer
+)
+{
+ if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
+ _Watchdog_Remove( &ts->Interval_watchdogs.Header, &timer->Ticker );
+ } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
+ _Watchdog_Remove( &ts->TOD_watchdogs.Header, &timer->Ticker );
+ }
+}
+
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
@@ -563,9 +575,10 @@ rtems_status_code rtems_timer_initiate_server(
);
/*
- * Initialize the pointer to the timer schedule method so applications that
+ * Initialize the pointer to the timer server methods so applications that
* do not use the Timer Server do not have to pull it in.
*/
+ ts->cancel = _Timer_server_Cancel_method;
ts->schedule_operation = _Timer_server_Schedule_operation_method;
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
diff --git a/cpukit/rtems/src/timerserverfireafter.c b/cpukit/rtems/src/timerserverfireafter.c
index 125664510f..0636782ae0 100644
--- a/cpukit/rtems/src/timerserverfireafter.c
+++ b/cpukit/rtems/src/timerserverfireafter.c
@@ -50,7 +50,7 @@ rtems_status_code rtems_timer_server_fire_after(
switch ( location ) {
case OBJECTS_LOCAL:
- (void) _Watchdog_Remove( &the_timer->Ticker );
+ _Timer_Cancel( the_timer );
_ISR_Disable( level );
diff --git a/cpukit/rtems/src/timerserverfirewhen.c b/cpukit/rtems/src/timerserverfirewhen.c
index 32695fb0e6..0069af1c3b 100644
--- a/cpukit/rtems/src/timerserverfirewhen.c
+++ b/cpukit/rtems/src/timerserverfirewhen.c
@@ -72,7 +72,7 @@ rtems_status_code rtems_timer_server_fire_when(
switch ( location ) {
case OBJECTS_LOCAL:
- (void) _Watchdog_Remove( &the_timer->Ticker );
+ _Timer_Cancel( the_timer );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
diff --git a/cpukit/score/include/rtems/score/mrspimpl.h b/cpukit/score/include/rtems/score/mrspimpl.h
index c40f41f716..07f78ce7e9 100644
--- a/cpukit/score/include/rtems/score/mrspimpl.h
+++ b/cpukit/score/include/rtems/score/mrspimpl.h
@@ -216,7 +216,7 @@ RTEMS_INLINE_ROUTINE MRSP_Status _MRSP_Wait_for_ownership(
_Thread_Set_life_protection( initial_life_protection );
if ( timeout > 0 ) {
- _Watchdog_Remove( &executing->Timer );
+ _Watchdog_Remove_ticks( &executing->Timer );
}
return status;
diff --git a/cpukit/score/include/rtems/score/watchdogimpl.h b/cpukit/score/include/rtems/score/watchdogimpl.h
index e548e7025c..ddd1ca4d1b 100644
--- a/cpukit/score/include/rtems/score/watchdogimpl.h
+++ b/cpukit/score/include/rtems/score/watchdogimpl.h
@@ -99,10 +99,12 @@ void _Watchdog_Handler_initialization( void );
* This routine removes @a the_watchdog from the watchdog chain on which
* it resides and returns the state @a the_watchdog timer was in.
*
+ * @param[in] header The watchdog chain.
* @param[in] the_watchdog will be removed
* @retval the state in which @a the_watchdog was in when removed
*/
Watchdog_States _Watchdog_Remove (
+ Watchdog_Header *header,
Watchdog_Control *the_watchdog
);
@@ -306,6 +308,20 @@ RTEMS_INLINE_ROUTINE void _Watchdog_Insert_seconds(
}
+RTEMS_INLINE_ROUTINE Watchdog_States _Watchdog_Remove_ticks(
+ Watchdog_Control *the_watchdog
+)
+{
+ return _Watchdog_Remove( &_Watchdog_Ticks_header, the_watchdog );
+}
+
+RTEMS_INLINE_ROUTINE Watchdog_States _Watchdog_Remove_seconds(
+ Watchdog_Control *the_watchdog
+)
+{
+ return _Watchdog_Remove( &_Watchdog_Seconds_header, the_watchdog );
+}
+
/**
* This routine resets THE_WATCHDOG timer to its state at INSERT
* time. This routine is valid only on interval watchdog timers
@@ -318,7 +334,7 @@ RTEMS_INLINE_ROUTINE void _Watchdog_Reset_ticks(
)
{
- (void) _Watchdog_Remove( the_watchdog );
+ _Watchdog_Remove_ticks( the_watchdog );
_Watchdog_Insert( &_Watchdog_Ticks_header, the_watchdog );
diff --git a/cpukit/score/src/threadqenqueue.c b/cpukit/score/src/threadqenqueue.c
index 5f94ec99c9..590865d8dd 100644
--- a/cpukit/score/src/threadqenqueue.c
+++ b/cpukit/score/src/threadqenqueue.c
@@ -66,7 +66,7 @@ static void _Thread_blocking_operation_Finalize(
if ( _Watchdog_Is_active( &the_thread->Timer ) ) {
_Watchdog_Deactivate( &the_thread->Timer );
_Thread_queue_Release( lock_context );
- (void) _Watchdog_Remove( &the_thread->Timer );
+ _Watchdog_Remove_ticks( &the_thread->Timer );
} else
_Thread_queue_Release( lock_context );
diff --git a/cpukit/score/src/threadrestart.c b/cpukit/score/src/threadrestart.c
index e759b5b42b..8dea518e10 100644
--- a/cpukit/score/src/threadrestart.c
+++ b/cpukit/score/src/threadrestart.c
@@ -62,7 +62,7 @@ static void _Thread_Make_zombie( Thread_Control *the_thread )
_Thread_Set_state( the_thread, STATES_ZOMBIE );
_Thread_queue_Extract_with_proxy( the_thread );
- _Watchdog_Remove( &the_thread->Timer );
+ _Watchdog_Remove_ticks( &the_thread->Timer );
_ISR_lock_ISR_disable_and_acquire( &zombies->Lock, &lock_context );
_Chain_Append_unprotected( &zombies->Chain, &the_thread->Object.Node );
@@ -235,7 +235,7 @@ static void _Thread_Start_life_change(
_Thread_Set_state( the_thread, STATES_RESTARTING );
_Thread_queue_Extract_with_proxy( the_thread );
- _Watchdog_Remove( &the_thread->Timer );
+ _Watchdog_Remove_ticks( &the_thread->Timer );
_Scheduler_Set_priority_if_higher( scheduler, the_thread, priority );
_Thread_Add_post_switch_action( the_thread, &the_thread->Life.Action );
_Thread_Ready( the_thread );
diff --git a/cpukit/score/src/watchdogremove.c b/cpukit/score/src/watchdogremove.c
index 34d97b0eae..d689e3cfc9 100644
--- a/cpukit/score/src/watchdogremove.c
+++ b/cpukit/score/src/watchdogremove.c
@@ -23,6 +23,7 @@
#include <rtems/score/watchdogimpl.h>
Watchdog_States _Watchdog_Remove(
+ Watchdog_Header *header,
Watchdog_Control *the_watchdog
)
{
diff --git a/cpukit/score/src/watchdogtickle.c b/cpukit/score/src/watchdogtickle.c
index 8c1a3a74b9..5b2f2582fc 100644
--- a/cpukit/score/src/watchdogtickle.c
+++ b/cpukit/score/src/watchdogtickle.c
@@ -74,7 +74,7 @@ void _Watchdog_Tickle(
}
do {
- watchdog_state = _Watchdog_Remove( the_watchdog );
+ watchdog_state = _Watchdog_Remove( header, the_watchdog );
_ISR_Enable( level );