mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-23 12:15:32 +08:00
RT_TIMER_CTRL_SET_TIME only accept rt_tick_t, pass rt_tick_t instead int/rt_int32_t
This commit is contained in:
@@ -242,10 +242,11 @@ static rt_err_t _comp_susp_thread(struct rt_completion *completion,
|
||||
/* start timer */
|
||||
if (timeout > 0)
|
||||
{
|
||||
rt_tick_t timeout_tick = timeout;
|
||||
/* reset the timeout of thread timer and start it */
|
||||
rt_timer_control(&(thread->thread_timer),
|
||||
RT_TIMER_CTRL_SET_TIME,
|
||||
&timeout);
|
||||
&timeout_tick);
|
||||
rt_timer_start(&(thread->thread_timer));
|
||||
}
|
||||
|
||||
|
||||
@@ -108,10 +108,11 @@ __try_again:
|
||||
/* start timer */
|
||||
if (timeout > 0)
|
||||
{
|
||||
rt_tick_t timeout_tick = timeout;
|
||||
/* reset the timeout of thread timer and start it */
|
||||
rt_timer_control(&(thread->thread_timer),
|
||||
RT_TIMER_CTRL_SET_TIME,
|
||||
&timeout);
|
||||
&timeout_tick);
|
||||
rt_timer_start(&(thread->thread_timer));
|
||||
}
|
||||
/* enable interrupt */
|
||||
|
||||
@@ -129,10 +129,11 @@ rt_err_t rt_data_queue_push(struct rt_data_queue *queue,
|
||||
/* start timer */
|
||||
if (timeout > 0)
|
||||
{
|
||||
rt_tick_t timeout_tick = timeout;
|
||||
/* reset the timeout of thread timer and start it */
|
||||
rt_timer_control(&(thread->thread_timer),
|
||||
RT_TIMER_CTRL_SET_TIME,
|
||||
&timeout);
|
||||
&timeout_tick);
|
||||
rt_timer_start(&(thread->thread_timer));
|
||||
}
|
||||
|
||||
@@ -247,10 +248,11 @@ rt_err_t rt_data_queue_pop(struct rt_data_queue *queue,
|
||||
/* start timer */
|
||||
if (timeout > 0)
|
||||
{
|
||||
rt_tick_t timeout_tick = timeout;
|
||||
/* reset the timeout of thread timer and start it */
|
||||
rt_timer_control(&(thread->thread_timer),
|
||||
RT_TIMER_CTRL_SET_TIME,
|
||||
&timeout);
|
||||
&timeout_tick);
|
||||
rt_timer_start(&(thread->thread_timer));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user