17#ifdef ROSS_QUEUE_kp_splay
18 g_tw_kp[id]->pq = tw_eventpq_create();
23#ifdef USE_RAND_TIEBREAKER
69 printf(
"%d %d: rb_to %f, now = %f \n",
111 kp =
event->dest_lp->kp;
121 printf(
"%d %d: rb_event: %f \n",
pe->id, kp->
id, event->
recv_ts);
130#ifdef USE_RAND_TIEBREAKER
145#ifdef USE_RAND_TIEBREAKER
159#define NUM_OUT_MESG 2000
169 ret[i].
next = &ret[i + 1];
204 for (j = 0; j < 3; j++)
static tw_clock tw_clock_read(void)
void tw_pq_enqueue(tw_pq *, tw_event *)
#define TW_STIME_CMP(x, y)
void * tw_calloc(const char *file, int line, const char *for_who, size_t e_sz, size_t n)
void tw_kp_rollback_to_sig(tw_kp *kp, tw_event_sig const *to_sig)
void tw_error(const char *file, int line, const char *fmt,...)
void tw_event_rollback(tw_event *event)
tw_synch g_tw_synchronization_protocol
static tw_kp * tw_getkp(tw_kpid id)
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)
static tw_event * tw_eventq_shift(tw_eventq *q)
unsigned int s_rb_secondary
tw_stime recv_ts
Actual time to be received.
tw_event_sig sig
Event signature, to be used by tiebreaker.
long s_e_rbs
Number of events rolled back by this LP.
tw_eventq pevent_q
Events processed by LPs bound to this KP.
tw_out * output
Output messages.
struct st_kp_stats * kp_stats
struct st_kp_stats * last_stats[3]
tw_pe * pe
PE that services this KP.
tw_event_sig last_sig
Event signature of the current event being processed.
tw_stime last_time
Time of the current event being processed.
long s_rb_secondary
Number of secondary rollbacks by this LP.
tw_stat s_nevent_processed
Number of events processed.
long s_rb_total
Number of total rollbacks by this LP.
tw_kpid id
ID number, otherwise its not available to the app.
Rollback-aware output mechanism.
Holds the entire PE state.
tw_pq * pq
Priority queue used to sort events.
tw_stime GVT
Global Virtual Time.
tw_statistics stats
per PE counters
tw_event_sig GVT_sig
Global Virtual Time Signature.
static tw_out * init_output_messages(tw_kp *kp)
void tw_init_kps(tw_pe *me)
void tw_kp_rollback_to(tw_kp *kp, tw_stime to)
void tw_kp_rollback_event(tw_event *event)
void tw_kp_onpe(tw_kpid id, tw_pe *pe)
void tw_kp_put_back_output_buffer(tw_out *out)
tw_out * tw_kp_grab_output_buffer(tw_kp *kp)