50 #define MAX_CONSECUTIVE_IDLE_CYCLES 1000 58 extern void scheduler_init(
void);
61 extern void schedule_on_init(
struct lp_struct *next);
62 extern void initialize_worker_thread(
void);
66 extern bool receive_control_msg(
msg_t *);
67 extern bool process_control_msg(
msg_t *);
68 extern bool reprocess_control_msg(
msg_t *);
70 extern bool anti_control_message(
msg_t * msg);
72 #ifdef HAVE_PREEMPTION 73 extern void preempt_init(
void);
74 extern void preempt_fini(
void);
75 extern void reset_min_in_transit(
unsigned int);
76 extern void update_min_in_transit(
unsigned int,
simtime_t);
77 void enable_preemption(
void);
78 void disable_preemption(
void);
85 #ifdef HAVE_PREEMPTION 86 extern __thread
volatile bool platform_mode;
87 #define switch_to_platform_mode() do {\ 88 if(current->state != LP_STATE_SILENT_EXEC) {\ 89 platform_mode = true;\ 93 #define switch_to_application_mode() platform_mode = false 95 #define switch_to_platform_mode() {} 96 #define switch_to_application_mode() {}
void activate_LP(struct lp_struct *, msg_t *)
Message queueing subsystem.
User-Level Threads Headers.
Core ROOT-Sim functionalities.
ROOT-Sim header for model development.
__thread msg_t * current_evt
__thread unsigned int n_prc_per_thread
This is used to keep track of how many LPs were bound to the current KLT.
void LP_main_loop(void *args)
__thread struct lp_struct * current
This is a per-thread variable pointing to the block state of the LP currently scheduled.
double simtime_t
This defines the type with whom timestamps are represented.
void scheduler_fini(void)
O(n) scheduling algorithm.