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:
Martin Jäger 2020-11-09 10:14:53 +01:00 committed by Anas Nashif
commit 19c2f78495

View file

@ -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