kernel: sched: Change variable name in z_tick_sleep
Change a variable name to avoid confusion between time and ticks. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
7a815d5d99
commit
9a16097fd8
1 changed files with 3 additions and 3 deletions
|
@ -1259,7 +1259,7 @@ static inline void z_vrfy_k_yield(void)
|
|||
static int32_t z_tick_sleep(k_ticks_t ticks)
|
||||
{
|
||||
#ifdef CONFIG_MULTITHREADING
|
||||
uint32_t expected_wakeup_time;
|
||||
uint32_t expected_wakeup_ticks;
|
||||
|
||||
__ASSERT(!arch_is_in_isr(), "");
|
||||
|
||||
|
@ -1285,7 +1285,7 @@ static int32_t z_tick_sleep(k_ticks_t ticks)
|
|||
timeout = Z_TIMEOUT_TICKS(ticks);
|
||||
#endif
|
||||
|
||||
expected_wakeup_time = ticks + z_tick_get_32();
|
||||
expected_wakeup_ticks = ticks + z_tick_get_32();
|
||||
|
||||
k_spinlock_key_t key = k_spin_lock(&sched_spinlock);
|
||||
|
||||
|
@ -1300,7 +1300,7 @@ static int32_t z_tick_sleep(k_ticks_t ticks)
|
|||
|
||||
__ASSERT(!z_is_thread_state_set(_current, _THREAD_SUSPENDED), "");
|
||||
|
||||
ticks = (k_ticks_t)expected_wakeup_time - z_tick_get_32();
|
||||
ticks = (k_ticks_t)expected_wakeup_ticks - z_tick_get_32();
|
||||
if (ticks > 0) {
|
||||
return ticks;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue