30#define ROSS_WARN_TIE_COLLISION 1
32#define UP(t) ((t)->up)
33#define UPUP(t) ((t)->up->up)
34#define LEFT(t) ((t)->next)
35#define RIGHT(t) ((t)->prev)
36#define KEY(t) ((t)->recv_ts)
47#define ROTATE_R(n,p,g) \
48 if((LEFT(p) = RIGHT(n))) UP(RIGHT(n)) = p; RIGHT(n) = p; \
51#define ROTATE_L(n,p,g) \
52 if((RIGHT(p) = LEFT(n))) UP(LEFT(n)) = p; LEFT(n) = p; \
98#ifdef USE_RAND_TIEBREAKER
113 for(
int i = 0; i < min_len; i++)
128 printf(
"ROSS Splay Tree Warning: Identical Tiebreaker and Event IDs found - Implies RNG Collision\n");
149 register tw_event *n = node, *g, *p;
156 if (!((g =
UPUP(n))))
159 }
else if (p ==
LEFT(g))
199 if (!((g =
UPUP(n))))
202 }
else if (p ==
RIGHT(g))
260#ifdef USE_RAND_TIEBREAKER
261 if( tw_pq_compare_less_than_rand( n, e ) )
357 "tw_pq_delete_any: attempt to delete from empty queue \n");
364 if ((tmp =
RIGHT(r)))
373 }
else if ((n =
RIGHT(r)))
403#ifdef USE_RAND_TIEBREAKER
#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_error(const char *file, int line, const char *fmt,...)
tw_event_sig const g_tw_max_sig
static int min_int(int x, int y)
#define ROSS_WARN_TIE_COLLISION
#define ROTATE_L(n, p, g)
unsigned int tw_pq_max_size(splay_tree *pq)
tw_stime tw_pq_minimum(splay_tree *pq)
void tw_pq_enqueue(splay_tree *st, tw_event *e)
static void splay(tw_event *node)
void tw_pq_delete_any(splay_tree *st, tw_event *r)
static unsigned int tw_pq_compare_less_than(tw_event *n, tw_event *e)
#define ROTATE_R(n, p, g)
tw_event * tw_pq_dequeue(splay_tree *st)
unsigned int tw_pq_get_size(splay_tree *st)
tw_pq * tw_pq_create(void)
double event_tiebreaker[20]
unsigned int tie_lineage_length
struct tw_event::@130070134144252114152124341363102114315067064025 state
tw_stime recv_ts
Actual time to be received.
unsigned char owner
Owner of the next/prev pointers; see tw_event_owner.
tw_lpid send_lp
sending LP ID for data collection uses
tw_lp * dest_lp
Destination LP ID.
tw_eventid event_id
Unique id assigned by src_lp->pe if remote.
tw_event_sig sig
Event signature, to be used by tiebreaker.