kernel: rename sliceable -> thread_is_sliceable

Trivial rename of sliceable function.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2024-03-27 07:13:45 -04:00
parent 37df485463
commit 0b473ce925
2 changed files with 4 additions and 4 deletions

View file

@ -52,7 +52,7 @@ void z_sched_ipi(void)
#endif /* CONFIG_TRACE_SCHED_IPI */ #endif /* CONFIG_TRACE_SCHED_IPI */
#ifdef CONFIG_TIMESLICING #ifdef CONFIG_TIMESLICING
if (sliceable(_current)) { if (thread_is_sliceable(_current)) {
z_time_slice(); z_time_slice();
} }
#endif /* CONFIG_TIMESLICING */ #endif /* CONFIG_TIMESLICING */

View file

@ -36,7 +36,7 @@ static inline int slice_time(struct k_thread *thread)
return ret; return ret;
} }
bool sliceable(struct k_thread *thread) bool thread_is_sliceable(struct k_thread *thread)
{ {
bool ret = is_preempt(thread) bool ret = is_preempt(thread)
&& slice_time(thread) != 0 && slice_time(thread) != 0
@ -72,7 +72,7 @@ void z_reset_time_slice(struct k_thread *thread)
z_abort_timeout(&slice_timeouts[cpu]); z_abort_timeout(&slice_timeouts[cpu]);
slice_expired[cpu] = false; slice_expired[cpu] = false;
if (sliceable(thread)) { if (thread_is_sliceable(thread)) {
z_add_timeout(&slice_timeouts[cpu], slice_timeout, z_add_timeout(&slice_timeouts[cpu], slice_timeout,
K_TICKS(slice_time(thread) - 1)); K_TICKS(slice_time(thread) - 1));
} }
@ -114,7 +114,7 @@ void z_time_slice(void)
pending_current = NULL; pending_current = NULL;
#endif #endif
if (slice_expired[_current_cpu->id] && sliceable(curr)) { if (slice_expired[_current_cpu->id] && thread_is_sliceable(curr)) {
#ifdef CONFIG_TIMESLICE_PER_THREAD #ifdef CONFIG_TIMESLICE_PER_THREAD
if (curr->base.slice_expired) { if (curr->base.slice_expired) {
k_spin_unlock(&_sched_spinlock, key); k_spin_unlock(&_sched_spinlock, key);