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 34 extern struct xnsched_class xnsched_class_idle;
36 static inline void __xnsched_idle_setparam(
struct xnthread *thread,
37 const union xnsched_policy_param *p)
39 xnthread_clear_state(thread,
XNWEAK);
40 thread->cprio = p->idle.prio;
43 static inline void __xnsched_idle_getparam(
struct xnthread *thread,
44 union xnsched_policy_param *p)
46 p->idle.prio = thread->cprio;
49 static inline void __xnsched_idle_trackprio(
struct xnthread *thread,
50 const union xnsched_policy_param *p)
53 __xnsched_idle_setparam(thread, p);
55 thread->cprio = XNSCHED_IDLE_PRIO;
58 static inline int xnsched_idle_init_thread(
struct xnthread *thread)
#define XNWEAK
Non real-time shadow (from the WEAK class)
Definition: thread.h:49