@@ -553,6 +553,7 @@ static rt_err_t _do_send_recv_timeout(rt_channel_t ch, rt_channel_msg_t data, in
553
553
rt_thread_wakeup_set (thread_send , wakeup_sender_wait_recv , (void * )ch );
554
554
if (time > 0 )
555
555
{
556
+ rt_tick_t time_tick = time ;
556
557
rt_timer_control (& (thread_send -> thread_timer ),
557
558
RT_TIMER_CTRL_GET_FUNC ,
558
559
& old_timeout_func );
@@ -562,7 +563,7 @@ static rt_err_t _do_send_recv_timeout(rt_channel_t ch, rt_channel_msg_t data, in
562
563
/* reset the timeout of thread timer and start it */
563
564
rt_timer_control (& (thread_send -> thread_timer ),
564
565
RT_TIMER_CTRL_SET_TIME ,
565
- & time );
566
+ & time_tick );
566
567
rt_timer_start (& (thread_send -> thread_timer ));
567
568
}
568
569
}
@@ -597,6 +598,7 @@ static rt_err_t _do_send_recv_timeout(rt_channel_t ch, rt_channel_msg_t data, in
597
598
rt_thread_wakeup_set (thread_send , wakeup_sender_wait_reply , (void * )ch );
598
599
if (time > 0 )
599
600
{
601
+ rt_tick_t time_tick = time ;
600
602
rt_timer_control (& (thread_send -> thread_timer ),
601
603
RT_TIMER_CTRL_GET_FUNC ,
602
604
& old_timeout_func );
@@ -606,7 +608,7 @@ static rt_err_t _do_send_recv_timeout(rt_channel_t ch, rt_channel_msg_t data, in
606
608
/* reset the timeout of thread timer and start it */
607
609
rt_timer_control (& (thread_send -> thread_timer ),
608
610
RT_TIMER_CTRL_SET_TIME ,
609
- & time );
611
+ & time_tick );
610
612
rt_timer_start (& (thread_send -> thread_timer ));
611
613
}
612
614
}
@@ -870,6 +872,7 @@ static rt_err_t _rt_raw_channel_recv_timeout(rt_channel_t ch, rt_channel_msg_t d
870
872
thread -> error = RT_EOK ;
871
873
if (time > 0 )
872
874
{
875
+ rt_tick_t time_tick = time ;
873
876
rt_timer_control (& (thread -> thread_timer ),
874
877
RT_TIMER_CTRL_GET_FUNC ,
875
878
& old_timeout_func );
@@ -879,7 +882,7 @@ static rt_err_t _rt_raw_channel_recv_timeout(rt_channel_t ch, rt_channel_msg_t d
879
882
/* reset the timeout of thread timer and start it */
880
883
rt_timer_control (& (thread -> thread_timer ),
881
884
RT_TIMER_CTRL_SET_TIME ,
882
- & time );
885
+ & time_tick );
883
886
rt_timer_start (& (thread -> thread_timer ));
884
887
}
885
888
rt_spin_unlock_irqrestore (& ch -> slock , level );
0 commit comments