ROSS
Macros | Functions
tw-eventq.h File Reference
#include <ross.h>

Go to the source code of this file.

Macros

#define ROSS_DEBUG   0
 

Functions

static void tw_eventq_debug (tw_eventq *q)
 
static void tw_eventq_push_list (tw_eventq *q, tw_event *h, tw_event *t, long cnt)
 
static void tw_eventq_fossil_collect (tw_eventq *q, tw_pe *pe)
 
static void tw_eventq_alloc (tw_eventq *q, unsigned int cnt)
 
static void tw_eventq_push (tw_eventq *q, tw_event *e)
 
static tw_eventtw_eventq_peek (tw_eventq *q)
 
static tw_eventtw_eventq_pop (tw_eventq *q)
 
static void tw_eventq_unshift (tw_eventq *q, tw_event *e)
 
static tw_eventtw_eventq_peek_head (tw_eventq *q)
 
static tw_eventtw_eventq_shift (tw_eventq *q)
 
static void tw_eventq_delete_any (tw_eventq *q, tw_event *e)
 
static tw_eventtw_eventq_pop_list (tw_eventq *q)
 
static void tw_eventq_splice (tw_eventq *q, tw_event *h, tw_event *t, int cnt)
 

Macro Definition Documentation

#define ROSS_DEBUG   0

Definition at line 4 of file tw-eventq.h.

Function Documentation

static void tw_eventq_alloc ( tw_eventq q,
unsigned int  cnt 
)
inlinestatic

allocate a events into a given tw_eventq

Definition at line 186 of file tw-eventq.h.

References g_tw_event_msg_sz, g_tw_events_per_pe, g_tw_gvt_threshold, g_tw_msg_sz, g_tw_net_device_size, tw_eventq::head, tw_event::next, tw_event::prev, ROSS_MAX, tw_eventq::size, tw_eventq::tail, tw_calloc(), TW_LOC, and TW_pe_free_q.

Referenced by setup_pes().

Here is the call graph for this function:

Here is the caller graph for this function:

static void tw_eventq_debug ( tw_eventq q)
inlinestatic

debug assitant fuction

Definition at line 12 of file tw-eventq.h.

References tw_eventq::head, tw_event::next, tw_event::prev, tw_eventq::size, tw_eventq::tail, tw_error(), and TW_LOC.

Referenced by tw_eventq_delete_any(), tw_eventq_pop(), tw_eventq_push(), tw_eventq_push_list(), tw_eventq_shift(), tw_eventq_splice(), and tw_eventq_unshift().

Here is the call graph for this function:

Here is the caller graph for this function:

static void tw_eventq_delete_any ( tw_eventq q,
tw_event e 
)
inlinestatic

delete an event from anywhere in the list

Definition at line 384 of file tw-eventq.h.

References tw_eventq::head, tw_event::next, tw_event::prev, tw_eventq::size, tw_eventq::tail, and tw_eventq_debug().

Referenced by io_event_cancel(), tw_net_cancel(), and tw_sched_cancel_q().

Here is the call graph for this function:

Here is the caller graph for this function:

static void tw_eventq_fossil_collect ( tw_eventq q,
tw_pe pe 
)
inlinestatic

Given a list, move the portion of its contents that is older than GVT to the free list.

Assumptions:

  • The provided q is not the free_q
  • The head of the list has the maximum time stamp in the list. Therefore, if the head is older than GVT, everything in the list is as well.

Definition at line 134 of file tw-eventq.h.

References tw_pe::free_q, tw_pe::GVT, tw_eventq::head, tw_event::next, tw_event::prev, tw_event::recv_ts, tw_eventq::size, tw_eventq::tail, tw_eventq_push_list(), and TW_STIME_CMP.

Referenced by tw_pe_fossil_collect().

Here is the call graph for this function:

Here is the caller graph for this function:

static tw_event* tw_eventq_peek ( tw_eventq q)
inlinestatic

peek to tail of list

Definition at line 280 of file tw-eventq.h.

References tw_eventq::tail.

Referenced by send_begin(), tw_sched_batch(), and tw_sched_batch_realtime().

Here is the caller graph for this function:

static tw_event* tw_eventq_peek_head ( tw_eventq q)
inlinestatic

peek at head of list

Definition at line 344 of file tw-eventq.h.

References tw_eventq::head.

static tw_event* tw_eventq_pop ( tw_eventq q)
inlinestatic

pop to tail of list

Definition at line 289 of file tw-eventq.h.

References tw_eventq::head, tw_event::next, tw_event::prev, tw_eventq::size, tw_eventq::tail, and tw_eventq_debug().

Referenced by io_event_grab(), io_load_events(), io_read_checkpoint(), io_store_checkpoint(), send_begin(), setup_pes(), and tw_event_grab().

Here is the call graph for this function:

Here is the caller graph for this function:

static tw_event* tw_eventq_pop_list ( tw_eventq q)
inlinestatic

pop the entire list. After this operation, the size of the provided q is 0.

Definition at line 412 of file tw-eventq.h.

References tw_eventq::head, tw_eventq::size, and tw_eventq::tail.

Referenced by tw_sched_event_q().

Here is the caller graph for this function:

static void tw_eventq_push ( tw_eventq q,
tw_event e 
)
inlinestatic

push to tail of list

Definition at line 257 of file tw-eventq.h.

References tw_eventq::head, tw_event::next, tw_event::prev, tw_eventq::size, tw_eventq::tail, and tw_eventq_debug().

Referenced by io_event_cancel(), io_event_grab(), io_load_events(), io_read_checkpoint(), io_store_checkpoint(), recv_finish(), send_finish(), setup_pes(), and tw_event_send().

Here is the call graph for this function:

Here is the caller graph for this function:

static void tw_eventq_push_list ( tw_eventq q,
tw_event h,
tw_event t,
long  cnt 
)
inlinestatic
static tw_event* tw_eventq_shift ( tw_eventq q)
inlinestatic

pop from head of list

Definition at line 353 of file tw-eventq.h.

References tw_eventq::head, tw_event::next, tw_event::prev, tw_eventq::size, tw_eventq::tail, and tw_eventq_debug().

Referenced by setup_pes(), tw_kp_rollback_event(), and tw_kp_rollback_to().

Here is the call graph for this function:

Here is the caller graph for this function:

static void tw_eventq_splice ( tw_eventq q,
tw_event h,
tw_event t,
int  cnt 
)
inlinestatic

The purpose of this function is to be able to remove some part of a list.. could be all of list, from head to some inner buffer, or from some inner buffer to tail. I only care about the last case..

Definition at line 429 of file tw-eventq.h.

References tw_eventq::head, tw_event::next, tw_event::prev, tw_eventq::size, tw_eventq::tail, and tw_eventq_debug().

Here is the call graph for this function:

static void tw_eventq_unshift ( tw_eventq q,
tw_event e 
)
inlinestatic

push to head of list

Definition at line 320 of file tw-eventq.h.

References tw_eventq::head, tw_event::next, tw_event::prev, tw_eventq::size, tw_eventq::tail, and tw_eventq_debug().

Referenced by tw_event_free(), tw_net_cancel(), tw_net_send(), tw_sched_batch(), tw_sched_batch_realtime(), and tw_scheduler_optimistic_debug().

Here is the call graph for this function:

Here is the caller graph for this function: