• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • Examples
  • File List
  • Globals

include/nucleus/sched-idle.h

Go to the documentation of this file.
00001 
00023 #ifndef _XENO_NUCLEUS_SCHED_IDLE_H
00024 #define _XENO_NUCLEUS_SCHED_IDLE_H
00025 
00026 #ifndef _XENO_NUCLEUS_SCHED_H
00027 #error "please don't include nucleus/sched-idle.h directly"
00028 #endif
00029 
00030 /* Idle priority level - actually never used for indexing. */
00031 #define XNSCHED_IDLE_PRIO       -1
00032 
00033 #if defined(__KERNEL__) || defined(__XENO_SIM__)
00034 
00035 extern struct xnsched_class xnsched_class_idle;
00036 
00037 #define xnsched_class_default xnsched_class_rt
00038 
00039 static inline void __xnsched_idle_setparam(struct xnthread *thread,
00040                                            const union xnsched_policy_param *p)
00041 {
00042         if (xnthread_test_state(thread, XNSHADOW))
00043                 xnthread_clear_state(thread, XNOTHER);
00044         thread->cprio = p->idle.prio;
00045 }
00046 
00047 static inline void __xnsched_idle_getparam(struct xnthread *thread,
00048                                            union xnsched_policy_param *p)
00049 {
00050         p->idle.prio = thread->cprio;
00051 }
00052 
00053 static inline void __xnsched_idle_trackprio(struct xnthread *thread,
00054                                             const union xnsched_policy_param *p)
00055 {
00056         if (p)
00057                 __xnsched_idle_setparam(thread, p);
00058         else
00059                 thread->cprio = XNSCHED_IDLE_PRIO;
00060 }
00061 
00062 static inline int xnsched_idle_init_tcb(struct xnthread *thread)
00063 {
00064         return 0;
00065 }
00066 
00067 #endif /* __KERNEL__ || __XENO_SIM__ */
00068 
00069 #endif /* !_XENO_NUCLEUS_SCHED_IDLE_H */

Generated on Wed Jan 23 2013 13:24:01 for Xenomai API by  doxygen 1.7.1