4#ifdef USE_RAND_TIEBREAKER
5#define INCREASE_ABORTED_COUNT(event) event->aborted_total++
7#define INCREASE_ABORTED_COUNT(event)
16 tw_lp *src_lp =
event->src_lp;
18 tw_pe *dest_pe = NULL;
50 event->send_lp = src_lp->
gid;
55 tw_error(
TW_LOC,
"Lookahead violation: decrease g_tw_lookahead %f\n"
56 "Event causing violation: src LP: %lu, src PE: %lu\n"
57 "dest LP %lu, dest PE %lu, recv_ts %f\n",
64 tw_error(
TW_LOC,
"It is an error to send an event with pre-loaded output message.");
71 dest_pe =
event->dest_lp->pe;
73#ifdef USE_RAND_TIEBREAKER
94 if(send_pe != dest_pe) {
112#ifdef USE_RAND_TIEBREAKER
123 event->state.cancel_q = 1;
130 tw_pe *send_pe =
event->src_lp->pe;
148#ifdef USE_RAND_TIEBREAKER
167 dest_peid =
event->dest_lp->pe->id;
170 if (send_pe->
id == dest_peid) {
187#ifdef USE_RAND_TIEBREAKER
200 }
else if ((
unsigned long)send_pe->
id == dest_peid) {
208#ifdef USE_RAND_TIEBREAKER
223 tw_lp *dest_lp =
event->dest_lp;
228#ifdef USE_RAND_TIEBREAKER
246#ifdef USE_RAND_TIEBREAKER
257 goto jump_over_rc_event_handler;
267 goto jump_over_rc_event_handler;
275jump_over_rc_event_handler:
280 event->delta_buddy = 0;
286#ifdef USE_RAND_TIEBREAKER
293#ifdef USE_RAND_TIEBREAKER
297 event->aborted_total--;
301 event->caused_by_me = NULL;
#define USE_RAND_TIEBREAKER
void buddy_free(void *ptr)
static tw_clock tw_clock_read(void)
static int tw_gvt_inprogress(tw_pe *pe)
void tw_net_cancel(tw_event *)
Cancel the given remote event by either removing from the outq or sending an antimessage,...
void tw_net_send(tw_event *)
Adds the event to the outgoing queue of events to be sent, polls for finished sends,...
void tw_pq_enqueue(tw_pq *, tw_event *)
void tw_pq_delete_any(tw_pq *, tw_event *)
void io_event_cancel(tw_event *e)
#define TW_STIME_CMP(x, y)
static void * tw_event_data(tw_event *event)
static void tw_free_output_messages(tw_event *e, int print_message)
static void tw_event_free(tw_pe *, tw_event *)
void tw_error(const char *file, int line, const char *fmt,...)
tw_synch g_tw_synchronization_protocol
static tw_stime tw_now(tw_lp const *lp)
static tw_lp * tw_getlocal_lp(tw_lpid gid)
#define tw_rand_reverse_unif(G)
static int tw_event_sig_compare_ptr(tw_event_sig const *e_sig, tw_event_sig const *n_sig)
static void tw_copy_event_sig(tw_event_sig *e, tw_event_sig const *sig)
@ TW_pe_event_q
In a tw_pe.event_q list.
@ TW_pe_sevent_q
In tw_pe.sevent_q.
@ TW_kp_pevent_q
In a tw_kp.pevent_q.
@ TW_net_asend
Network transmission in progress.
@ TW_net_outq
Pending network transmission.
static void tw_eventq_push(tw_eventq *q, tw_event *e)
unsigned int tie_lineage_length
struct tw_event::@130070134144252114152124341363102114315067064025 state
tw_event * cause_next
Next in parent's caused_by_me chain.
tw_lp * src_lp
Sending LP ID.
tw_out * out_msgs
Output messages.
tw_stime recv_ts
Actual time to be received.
unsigned char owner
Owner of the next/prev pointers; see tw_event_owner.
void * delta_buddy
Delta memory from buddy allocator.
tw_event * caused_by_me
Start of event list caused by this event.
tw_bf cv
Used by app during reverse computation.
tw_lp * dest_lp
Destination LP ID.
tw_event_sig sig
Event signature, to be used by tiebreaker.
size_t aborted_total
Number of events caused by this event that were not scheduled.
long s_e_rbs
Number of events rolled back by this LP.
struct st_kp_stats * kp_stats
tw_event_sig last_sig
Event signature of the current event being processed.
tw_stime last_time
Time of the current event being processed.
tw_kp * kp
kp – Kernel process that we belong to (must match pe).
tw_lptype * type
Type of this LP, including service callbacks.
tw_rng_stream * core_rng
RNG stream array for ROSS non-model operation - possible alternative to a model_rng pointer array.
unsigned int suspend_do_orig_event_rc
struct st_lp_stats * lp_stats
unsigned int suspend_error_number
unsigned int critical_path
Critical path value for this LP.
void * cur_state
Current application LP data.
unsigned int suspend_flag
map_f map
LP Mapping of LP gid -> remote PE routine.
revent_f revent
LP Reverse event handler routine.
Holds the entire PE state.
tw_eventq event_q
Linked list of events sent to this PE.
tw_pq * pq
Priority queue used to sort events.
tw_event_sig trans_msg_sig
Last transient messages' time signature.
tw_event * cancel_q
List of canceled events.
unsigned char cev_abort
Current event being processed must be aborted.
tw_stime trans_msg_ts
Last transient messages' time stamp.
tw_event * cur_event
Current event being processed.
tw_event * abort_event
Placeholder event for when free_q is empty.
tw_statistics stats
per PE counters
tw_eventid seq_num
Array of remote send counters for hashing on, size == g_tw_npe.
tw_stat s_nsend_loc_remote
tw_stat s_nsend_net_remote
static void link_causality(tw_event *nev, tw_event *cev)
#define INCREASE_ABORTED_COUNT(event)
static void event_cancel(tw_event *event)
void tw_event_send(tw_event *event)
void tw_event_rollback(tw_event *event)
static void local_cancel(tw_pe *d, tw_event *event)