19#ifndef _COBALT_KERNEL_SCHED_IDLE_H
20#define _COBALT_KERNEL_SCHED_IDLE_H
22#ifndef _COBALT_KERNEL_SCHED_H
23#error "please don't include cobalt/kernel/sched-idle.h directly"
32#define XNSCHED_IDLE_PRIO -1
34extern struct xnsched_class xnsched_class_idle;
36static inline bool __xnsched_idle_setparam(
struct xnthread *thread,
37 const union xnsched_policy_param *p)
39 xnthread_clear_state(thread,
XNWEAK);
40 return xnsched_set_effective_priority(thread, p->idle.prio);
43static inline void __xnsched_idle_getparam(
struct xnthread *thread,
44 union xnsched_policy_param *p)
46 p->idle.prio = thread->cprio;
49static inline void __xnsched_idle_trackprio(
struct xnthread *thread,
50 const union xnsched_policy_param *p)
54 XENO_WARN_ON_ONCE(COBALT, 1);
56 thread->cprio = XNSCHED_IDLE_PRIO;
59static inline void __xnsched_idle_protectprio(
struct xnthread *thread,
int prio)
61 XENO_WARN_ON_ONCE(COBALT, 1);
64static inline int xnsched_idle_init_thread(
struct xnthread *thread)
#define XNWEAK
Non real-time shadow (from the WEAK class)
Definition thread.h:48