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:
parent
91fe22ec7d
commit
77f42f8312
1 changed files with 7 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue