Skip to content

Commit

Permalink
🐞 fix(components/drivers/cputime/cputimer.c): fix cputimer with signal (
Browse files Browse the repository at this point in the history
  • Loading branch information
xqyjlj authored Apr 14, 2023
1 parent ad30969 commit 8748886
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/drivers/cputime/cputimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static void _cputime_timeout_callback(void *parameter)
_cputimer_nowtimer = RT_NULL;
rt_list_remove(&(timer->row));
rt_hw_interrupt_enable(level);
timer->timeout_func(&(timer->sem));
timer->timeout_func(timer->parameter);
}

static void _set_next_timeout()
Expand Down Expand Up @@ -204,7 +204,7 @@ rt_err_t rt_cputimer_control(rt_cputimer_t timer, int cmd, void *arg)

case RT_TIMER_CTRL_SET_TIME:
RT_ASSERT((*(rt_uint64_t *)arg) < 0x7fffffffffffffff);
timer->init_tick = *(rt_uint64_t *)arg;
timer->init_tick = *(rt_uint64_t *)arg + clock_cpu_gettime();
break;

case RT_TIMER_CTRL_SET_ONESHOT:
Expand Down

0 comments on commit 8748886

Please sign in to comment.