🐞 fix(components/drivers/cputime/cputimer.c): fix cputimer with signal (#7247)

This commit is contained in:
xqyjlj 2023-04-14 17:02:42 +08:00 committed by GitHub
parent ad309699d6
commit 8748886987
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()
@ -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: