30 #define UP(t) ((t)->up)
31 #define UPUP(t) ((t)->up->up)
32 #define LEFT(t) ((t)->next)
33 #define RIGHT(t) ((t)->prev)
34 #define KEY(t) ((t)->recv_ts)
45 #define ROTATE_R(n,p,g) \
46 if((LEFT(p) = RIGHT(n))) UP(RIGHT(n)) = p; RIGHT(n) = p; \
49 #define ROTATE_L(n,p,g) \
50 if((RIGHT(p) = LEFT(n))) UP(LEFT(n)) = p; LEFT(n) = p; \
106 if (!((g =
UPUP(n))))
109 }
else if (p ==
LEFT(g))
149 if (!((g =
UPUP(n))))
152 }
else if (p ==
RIGHT(g))
304 "tw_pq_delete_any: attempt to delete from empty queue \n");
311 if ((tmp =
RIGHT(r)))
320 }
else if ((n =
RIGHT(r)))
tw_lp * dest_lp
Destination LP ID.
static void splay(tw_event *node)
tw_stime tw_pq_minimum(splay_tree *pq)
#define ROTATE_L(n, p, g)
tw_eventid event_id
Unique id assigned by src_lp->pe if remote.
void tw_error(const char *file, int line, const char *fmt,...) NORETURN
tw_stime recv_ts
Actual time to be received.
tw_pq * tw_pq_create(void)
unsigned int tw_pq_get_size(splay_tree *st)
void tw_pq_delete_any(splay_tree *st, tw_event *r)
tw_event * tw_pq_dequeue(splay_tree *st)
#define TW_STIME_CMP(x, y)
void tw_pq_enqueue(splay_tree *st, tw_event *e)
tw_lpid send_lp
sending LP ID for data collection uses
unsigned int tw_pq_max_size(splay_tree *pq)
struct tw_event::@0 state
void * tw_calloc(const char *file, int line, const char *for_who, size_t e_sz, size_t n)
static unsigned int tw_pq_compare_less_than(tw_event *n, tw_event *e)
#define ROTATE_R(n, p, g)
unsigned char owner
Owner of the next/prev pointers; see tw_event_owner.