kernel: Move _ms_to_ticks() and __ticks_to_ms() close to each other.

This commit moves the _ms_to_ticks() and __ticks_to_ms() functions
close to each other in order to improve code readability.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
This commit is contained in:
Piotr Zięcik 2018-06-11 14:26:29 +02:00 committed by Anas Nashif
commit 77f42f8312

View file

@ -1353,13 +1353,6 @@ static ALWAYS_INLINE s32_t _ms_to_ticks(s32_t ms)
#endif
}
/* added tick needed to account for tick in progress */
#ifdef CONFIG_TICKLESS_KERNEL
#define _TICK_ALIGN 0
#else
#define _TICK_ALIGN 1
#endif
static inline s64_t __ticks_to_ms(s64_t ticks)
{
#ifdef CONFIG_SYS_CLOCK_EXISTS
@ -1381,6 +1374,13 @@ static inline s64_t __ticks_to_ms(s64_t ticks)
#endif
}
/* added tick needed to account for tick in progress */
#ifdef CONFIG_TICKLESS_KERNEL
#define _TICK_ALIGN 0
#else
#define _TICK_ALIGN 1
#endif
struct k_timer {
/*
* _timeout structure must be first here if we want to use