From 03b900d3ed120ea919ea3eded7edbece3488cff3 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 18 Feb 2016 08:36:26 +0100 Subject: score: Replace watchdog handler implementation Use a red-black tree instead of delta chains. Close #2344. Update #2554. Update #2555. Close #2606. --- cpukit/rtems/src/taskwakewhen.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'cpukit/rtems/src/taskwakewhen.c') diff --git a/cpukit/rtems/src/taskwakewhen.c b/cpukit/rtems/src/taskwakewhen.c index cf0b303cd3..5d6d45afcf 100644 --- a/cpukit/rtems/src/taskwakewhen.c +++ b/cpukit/rtems/src/taskwakewhen.c @@ -28,9 +28,9 @@ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { - Watchdog_Interval seconds; - Thread_Control *executing; - Per_CPU_Control *cpu_self; + uint32_t seconds; + Thread_Control *executing; + Per_CPU_Control *cpu_self; if ( !_TOD_Is_set() ) return RTEMS_NOT_DEFINED; @@ -52,15 +52,11 @@ 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 ); - _Watchdog_Initialize( - &executing->Timer, + _Thread_Timer_insert_absolute( + executing, + cpu_self, _Thread_Timeout, - 0, - executing - ); - _Watchdog_Insert_seconds( - &executing->Timer, - seconds - _TOD_Seconds_since_epoch() + _Watchdog_Ticks_from_seconds( seconds ) ); _Thread_Dispatch_enable( cpu_self ); return RTEMS_SUCCESSFUL; -- cgit v1.2.3