include: kernel.h: correct cast in K_TIMEOUT_ABS_*
The cast to k_ticks_t eliminates narrowing conversion warning from uint64_t to int64_t if CONFIG_TIMEOUT_64BIT is enabled. Signed-off-by: Martin Jäger <martin@libre.solar>
This commit is contained in:
parent
da614fccd6
commit
19c2f78495
1 changed files with 2 additions and 1 deletions
|
@ -1475,7 +1475,8 @@ const char *k_thread_state_str(k_tid_t thread_id);
|
|||
* @param t Tick uptime value
|
||||
* @return Timeout delay value
|
||||
*/
|
||||
#define K_TIMEOUT_ABS_TICKS(t) Z_TIMEOUT_TICKS(Z_TICK_ABS(MAX(t, 0)))
|
||||
#define K_TIMEOUT_ABS_TICKS(t) \
|
||||
Z_TIMEOUT_TICKS(Z_TICK_ABS((k_ticks_t)MAX(t, 0)))
|
||||
|
||||
/**
|
||||
* @brief Generates an absolute/uptime timeout value from milliseconds
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue