diff options
| author | Yonggang Luo <[email protected]> | 2025-09-22 01:04:46 +0800 |
|---|---|---|
| committer | R b b666 <[email protected]> | 2025-09-24 18:12:36 +0800 |
| commit | 66b2bcc080b39750cc69a2f00f0d951f94967712 (patch) | |
| tree | 8b93349cd771af71a55bfce5b0afe87cf296e2cf /src/mempool.c | |
| parent | 5bba332e23c6d5e859b4fe00cc5aea5ea6e26a73 (diff) | |
RT_TIMER_CTRL_SET_TIME only accept rt_tick_t, pass rt_tick_t instead int/rt_int32_t
Diffstat (limited to 'src/mempool.c')
| -rw-r--r-- | src/mempool.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mempool.c b/src/mempool.c index d0308eb216..b980a08aa5 100644 --- a/src/mempool.c +++ b/src/mempool.c @@ -314,13 +314,14 @@ void *rt_mp_alloc(rt_mp_t mp, rt_int32_t time) if (time > 0) { + rt_tick_t time_tick = time; /* get the start tick of timer */ before_sleep = rt_tick_get(); /* init thread timer and start it */ rt_timer_control(&(thread->thread_timer), RT_TIMER_CTRL_SET_TIME, - &time); + &time_tick); rt_timer_start(&(thread->thread_timer)); } |
