40 __thread
unsigned int __lp_counter = 0;
41 __thread
unsigned int __lp_bound_counter = 0;
51 void initialize_binding_blocks(
void)
58 void initialize_lps(
void)
63 unsigned int local = 0;
86 lps_blocks[local++] = lp;
89 printf(
"reached local %d\n", local);
94 initialize_memory_map(lp);
110 lp->
OnGVT = &OnGVT_light;
124 lp->
state = LP_STATE_READY;
140 for (j = 0; j <
n_cores; j++) {
144 #ifdef HAVE_CROSS_STATE 147 lp->ECS_synch_table[0] = LidToGid(lp);
160 if (lp->gid.to_int == gid.
to_int)
void context_create(exec_context_t *creat, void(*fn)(void *), void *args, void *stack, size_t stack_size)
msg_t * bound
Pointer to the last correctly processed event.
Structure for LP's state.
struct lp_struct ** lps_blocks
Maintain LPs' simulation and execution states.
Core ROOT-Sim functionalities.
unsigned int n_cores
Total number of cores required for simulation.
unsigned int max_size
Total space in outgoing_msgs.
int ckpt_period
Number of events to execute before taking a snapshot in PSS (ignored otherwise)
msg_channel * bottom_halves
Bottom halves.
void * stack
Process' stack.
unsigned int to_int
The LID numerical value.
unsigned int to_int
The GID numerical value.
The ROOT-Sim scheduler main module header.
#define INIT_OUTGOING_MSG
unsigned int find_kernel_by_gid(GID_t gid)
#define INFTY
Infinite timestamp: this is the highest timestamp in a simulation run.
void LP_main_loop(void *args)
double simtime_t
This defines the type with whom timestamps are represented.
simulation_configuration rootsim_config
This global variable holds the configuration for the current simulation.
bool(* OnGVT)(unsigned int me, void *snapshot)
__thread struct lp_struct ** lps_bound_blocks
void * get_ult_stack(size_t size)
outgoing_t outgoing_buffer
Buffer used by KLTs for buffering outgoing messages during the execution of an event.
GID_t gid
Global ID of the LP.
short unsigned int state
Current execution state of the LP.
unsigned int n_prc
Number of logical processes hosted by the current kernel instance.
LP_context_t context
LP execution state.
void(* ProcessEvent)(unsigned int me, simtime_t now, int event_type, void *event_content, unsigned int size, void *state)
LID_t lid
Local ID of the LP.
Message envelope definition. This is used to handle the output queue and stores information needed to...
msg_t ** outgoing_msgs
Resizable array of message pointers.
simtime_t * min_in_transit
Smallest timestamp of events kept here.
int snapshot
Type of snapshot (e.g., full, incremental, autonomic, ...)
void set_checkpoint_period(struct lp_struct *lp, int period)
unsigned int n_prc_tot
Total number of logical processes running in the simulation.
void * current_base_pointer
The current state base pointer (updated by SetState())
unsigned int kid
Identifier of the local kernel.
void distribute_lps_on_kernels(void)