23 #ifndef _XENO_NUCLEUS_SCHED_IDLE_H
24 #define _XENO_NUCLEUS_SCHED_IDLE_H
26 #ifndef _XENO_NUCLEUS_SCHED_H
27 #error "please don't include nucleus/sched-idle.h directly"
31 #define XNSCHED_IDLE_PRIO -1
33 #if defined(__KERNEL__) || defined(__XENO_SIM__)
35 extern struct xnsched_class xnsched_class_idle;
37 #define xnsched_class_default xnsched_class_rt
39 static inline void __xnsched_idle_setparam(
struct xnthread *thread,
40 const union xnsched_policy_param *p)
42 if (xnthread_test_state(thread,
XNSHADOW))
43 xnthread_clear_state(thread,
XNOTHER);
44 thread->cprio = p->idle.prio;
47 static inline void __xnsched_idle_getparam(
struct xnthread *thread,
48 union xnsched_policy_param *p)
50 p->idle.prio = thread->cprio;
53 static inline void __xnsched_idle_trackprio(
struct xnthread *thread,
54 const union xnsched_policy_param *p)
57 __xnsched_idle_setparam(thread, p);
59 thread->cprio = XNSCHED_IDLE_PRIO;
62 static inline int xnsched_idle_init_tcb(
struct xnthread *thread)
#define XNOTHER
Non real-time shadow (prio=0)
Definition: thread.h:65
#define XNSHADOW
Shadow thread.
Definition: thread.h:63