kernel: thread: rename is_preempt
Trivila rename to thread_is_preempt. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
6754cbd1b5
commit
5c170c7046
|
@ -49,7 +49,7 @@ static inline void thread_schedule_new(struct k_thread *thread, k_timeout_t dela
|
|||
}
|
||||
#endif /* CONFIG_MULTITHREADING */
|
||||
|
||||
static inline int is_preempt(struct k_thread *thread)
|
||||
static inline int thread_is_preemptible(struct k_thread *thread)
|
||||
{
|
||||
/* explanation in kernel_struct.h */
|
||||
return thread->base.preempt <= _PREEMPT_THRESHOLD;
|
||||
|
@ -209,7 +209,7 @@ static ALWAYS_INLINE bool should_preempt(struct k_thread *thread,
|
|||
/* Otherwise we have to be running a preemptible thread or
|
||||
* switching to a metairq
|
||||
*/
|
||||
if (is_preempt(_current) || thread_is_metairq(thread)) {
|
||||
if (thread_is_preemptible(_current) || thread_is_metairq(thread)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -334,7 +334,7 @@ static void update_metairq_preempt(struct k_thread *thread)
|
|||
#if (CONFIG_NUM_METAIRQ_PRIORITIES > 0) && \
|
||||
(CONFIG_NUM_COOP_PRIORITIES > CONFIG_NUM_METAIRQ_PRIORITIES)
|
||||
if (thread_is_metairq(thread) && !thread_is_metairq(_current) &&
|
||||
!is_preempt(_current)) {
|
||||
!thread_is_preemptible(_current)) {
|
||||
/* Record new preemption */
|
||||
_current_cpu->metairq_preempted = _current;
|
||||
} else if (!thread_is_metairq(thread) && !z_is_idle_thread_object(thread)) {
|
||||
|
|
|
@ -110,7 +110,7 @@ static inline void *z_vrfy_k_thread_custom_data_get(void)
|
|||
|
||||
int z_impl_k_is_preempt_thread(void)
|
||||
{
|
||||
return !arch_is_in_isr() && is_preempt(_current);
|
||||
return !arch_is_in_isr() && thread_is_preemptible(_current);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_USERSPACE
|
||||
|
|
|
@ -38,7 +38,7 @@ static inline int slice_time(struct k_thread *thread)
|
|||
|
||||
bool thread_is_sliceable(struct k_thread *thread)
|
||||
{
|
||||
bool ret = is_preempt(thread)
|
||||
bool ret = thread_is_preemptible(thread)
|
||||
&& slice_time(thread) != 0
|
||||
&& !z_is_prio_higher(thread->base.prio, slice_max_prio)
|
||||
&& !z_is_thread_prevented_from_running(thread)
|
||||
|
|
Loading…
Reference in a new issue