00001 #ifndef RRES_DISPATCH_UM_H_ 00002 #define RRES_DISPATCH_UM_H_ 00003 #include "rres_config.h" 00004 #include "kal_sched.h" 00005 #include "qos_debug.h" 00006 00007 #define rres_init_sched_param(task) \ 00008 set_task_rr_prio(task, RRES_DISPATCH_PRIORITY) 00009 00010 #define rres_task_sched_default(task) \ 00011 set_task_rr_prio(task, -1) 00012 00013 #define SCHED_OTHER SCHED_NORMAL 00014 00015 void stop_ResTask(void* t); 00016 void dispatch_ResTask(void* t); 00017 00019 static inline void stop_task(struct task_struct *t) { 00020 qos_log_debug("stopping task %d", kal_task_get_id(t)); 00021 stop_ResTask(t); 00022 current = idle; 00023 } 00024 00026 static inline void dispatch_task(struct task_struct *t) { 00027 qos_log_debug("dispatching task %d", kal_task_get_id(t)); 00028 dispatch_ResTask(t); 00029 current = t; 00030 } 00031 00032 #endif /*RRES_DISPATCH_UM_H_*/