#include <ross.h>
Go to the source code of this file.
Data Structures | |
struct | tw_pq |
Macros | |
#define | UP(t) ((t)->up) |
#define | UPUP(t) ((t)->up->up) |
#define | LEFT(t) ((t)->next) |
#define | RIGHT(t) ((t)->prev) |
#define | KEY(t) ((t)->recv_ts) |
#define | ROTATE_R(n, p, g) |
#define | ROTATE_L(n, p, g) |
Typedefs | |
typedef tw_pq | splay_tree |
Functions | |
tw_pq * | tw_pq_create (void) |
static unsigned int | tw_pq_compare_less_than (tw_event *n, tw_event *e) |
static void | splay (tw_event *node) |
void | tw_pq_enqueue (splay_tree *st, tw_event *e) |
tw_event * | tw_pq_dequeue (splay_tree *st) |
void | tw_pq_delete_any (splay_tree *st, tw_event *r) |
tw_stime | tw_pq_minimum (splay_tree *pq) |
unsigned int | tw_pq_get_size (splay_tree *st) |
unsigned int | tw_pq_max_size (splay_tree *pq) |
#define KEY | ( | t | ) | ((t)->recv_ts) |
Definition at line 34 of file splay.c.
Referenced by tw_pq_compare_less_than().
#define LEFT | ( | t | ) | ((t)->next) |
Definition at line 32 of file splay.c.
Referenced by splay(), tw_pq_delete_any(), tw_pq_dequeue(), and tw_pq_enqueue().
#define RIGHT | ( | t | ) | ((t)->prev) |
Definition at line 33 of file splay.c.
Referenced by splay(), tw_pq_delete_any(), tw_pq_dequeue(), and tw_pq_enqueue().
#define ROTATE_L | ( | n, | |
p, | |||
g | |||
) |
#define ROTATE_R | ( | n, | |
p, | |||
g | |||
) |
#define UP | ( | t | ) | ((t)->up) |
Definition at line 30 of file splay.c.
Referenced by splay(), tw_pq_delete_any(), tw_pq_dequeue(), and tw_pq_enqueue().
typedef tw_pq splay_tree |
|
static |
Definition at line 97 of file splay.c.
References LEFT, RIGHT, ROTATE_L, ROTATE_R, UP, and UPUP.
Referenced by tw_pq_delete_any(), and tw_pq_enqueue().
Definition at line 65 of file splay.c.
References tw_event::dest_lp, tw_event::event_id, tw_lp::gid, KEY, tw_event::recv_ts, tw_event::send_lp, tw_error(), TW_LOC, and TW_STIME_CMP.
Referenced by tw_pq_enqueue().
tw_pq* tw_pq_create | ( | void | ) |
Definition at line 54 of file splay.c.
References tw_pq::least, tw_pq::nitems, tw_pq::root, tw_calloc(), and TW_LOC.
Referenced by setup_pes().
void tw_pq_delete_any | ( | splay_tree * | st, |
tw_event * | r | ||
) |
Definition at line 288 of file splay.c.
References tw_pq::least, LEFT, tw_pq::nitems, tw_event::owner, RIGHT, tw_pq::root, splay(), tw_event::state, tw_error(), TW_LOC, tw_pq_dequeue(), and UP.
Referenced by event_cancel(), and tw_sched_cancel_q().
tw_event* tw_pq_dequeue | ( | splay_tree * | st | ) |
Definition at line 245 of file splay.c.
References tw_pq::least, LEFT, tw_pq::nitems, tw_event::owner, RIGHT, tw_pq::root, tw_event::state, and UP.
Referenced by tw_pq_delete_any(), tw_sched_batch(), tw_sched_batch_realtime(), tw_scheduler_conservative(), tw_scheduler_optimistic_debug(), and tw_scheduler_sequential().
void tw_pq_enqueue | ( | splay_tree * | st, |
tw_event * | e | ||
) |
Definition at line 195 of file splay.c.
References tw_pq::least, LEFT, tw_pq::max_size, tw_pq::nitems, tw_event::owner, RIGHT, tw_pq::root, splay(), tw_event::state, TW_pe_pq, tw_pq_compare_less_than(), and UP.
Referenced by recv_finish(), tw_event_send(), tw_kp_rollback_event(), tw_kp_rollback_to(), tw_sched_batch(), tw_sched_batch_realtime(), and tw_sched_event_q().
unsigned int tw_pq_get_size | ( | splay_tree * | st | ) |
Definition at line 351 of file splay.c.
References tw_pq::nitems.
Referenced by st_collect_engine_data_pes(), and tw_get_stats().
unsigned int tw_pq_max_size | ( | splay_tree * | pq | ) |
Definition at line 357 of file splay.c.
References tw_pq::max_size.
Referenced by gvt_print().
tw_stime tw_pq_minimum | ( | splay_tree * | pq | ) |
Definition at line 345 of file splay.c.
References tw_pq::least, tw_event::recv_ts, and TW_STIME_MAX.
Referenced by tw_gvt_step1(), tw_gvt_step1_realtime(), tw_gvt_step2(), tw_sched_batch(), tw_sched_batch_realtime(), tw_scheduler_conservative(), and tw_scheduler_sequential().