diff options
Diffstat (limited to 'cpukit/rtems/src/taskwakewhen.c')
-rw-r--r-- | cpukit/rtems/src/taskwakewhen.c | 18 |
1 files changed, 7 insertions, 11 deletions
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; |