ROSS
ross-types.h File Reference

Definition of ROSS basic types.

#include <string.h>
#include <sys/types.h>
#include "ross-base.h"
#include "ross-random.h"
#include "ross-clock.h"
#include "tw-timing.h"

Go to the source code of this file.

Data Structures

struct  tw_petype
 Virtual Functions for per PE ops. More...
struct  tw_lptype
 Function Pointers for ROSS Event Handlers. More...
struct  tw_statistics
 Statistics tallied over the duration of the simulation. More...
struct  tw_eventq
struct  tw_bf
 Reverse Computation Bitfield. More...
struct  tw_out
 Rollback-aware output mechanism. More...
struct  tw_causal_origin
struct  tw_event_sig
struct  tw_event
 Event Stucture. More...
struct  tw_lp
 LP State Structure. More...
struct  tw_kp
struct  tw_pe
 Holds the entire PE state. More...

Macros

#define MAX_TIE_CHAIN   20

Typedefs

typedef struct tw_statistics tw_statistics
typedef struct tw_pq tw_pq
typedef struct tw_lptype tw_lptype
typedef struct tw_petype tw_petype
typedef struct tw_bf tw_bf
typedef struct tw_eventq tw_eventq
typedef struct tw_event tw_event
typedef struct tw_lp tw_lp
typedef struct tw_kp tw_kp
typedef struct tw_pe tw_pe
typedef struct avlNodeAvlTree
typedef enum tw_synch_e tw_synch
typedef enum tw_lp_map tw_lp_map
typedef tw_peid tw_kpid
typedef unsigned int tw_eventid
typedef unsigned long long tw_stat
typedef void(* pe_init_f) (tw_pe *pe)
typedef void(* pe_gvt_f) (tw_pe *pe)
typedef void(* pe_final_f) (tw_pe *pe)
typedef void(* init_f) (void *sv, tw_lp *me)
typedef tw_peid(* map_f) (tw_lpid)
typedef tw_lp *(* map_local_f) (tw_lpid)
typedef void(* map_custom_f) (void)
typedef void(* pre_run_f) (void *sv, tw_lp *me)
typedef void(* event_f) (void *sv, tw_bf *cv, void *msg, tw_lp *me)
typedef void(* revent_f) (void *sv, tw_bf *cv, void *msg, tw_lp *me)
typedef void(* commit_f) (void *sv, tw_bf *cv, void *msg, tw_lp *me)
typedef void(* final_f) (void *sv, tw_lp *me)
typedef tw_lpid(* tw_typemap_f) (tw_lpid gid)
typedef enum tw_event_owner tw_event_owner
typedef struct tw_out tw_out
 Rollback-aware output mechanism.
typedef struct tw_causal_origin tw_unique_event_id
typedef struct tw_event_sig tw_event_sig

Enumerations

enum  tw_synch_e {
  NO_SYNCH , SEQUENTIAL , CONSERVATIVE , OPTIMISTIC ,
  OPTIMISTIC_DEBUG , OPTIMISTIC_REALTIME , SEQUENTIAL_ROLLBACK_CHECK
}
enum  tw_lp_map { LINEAR , ROUND_ROBIN , CUSTOM }
enum  tw_event_owner {
  TW_pe_event_q = 1 , TW_pe_pq = 2 , TW_kp_pevent_q = 3 , TW_pe_anti_msg = 4 ,
  TW_net_outq = 5 , TW_net_asend = 6 , TW_net_acancel = 7 , TW_pe_sevent_q = 8 ,
  TW_pe_free_q = 9
}

Functions

static int tw_unique_event_id_eq (tw_unique_event_id e, tw_unique_event_id n)
static void tw_copy_event_sig (tw_event_sig *e, tw_event_sig const *sig)
static int min_int (int x, int y)
static int tw_event_sig_compare_ptr (tw_event_sig const *e_sig, tw_event_sig const *n_sig)

Variables

tw_event_sig const g_tw_max_sig

Macro Definition Documentation

◆ MAX_TIE_CHAIN

#define MAX_TIE_CHAIN   20

Definition at line 30 of file ross-types.h.

Referenced by tw_event_new_user_prio().

Typedef Documentation

◆ AvlTree

typedef struct avlNode* AvlTree

Definition at line 28 of file ross-types.h.

◆ commit_f

typedef void(* commit_f) (void *sv, tw_bf *cv, void *msg, tw_lp *me)

Definition at line 89 of file ross-types.h.

◆ event_f

typedef void(* event_f) (void *sv, tw_bf *cv, void *msg, tw_lp *me)

Definition at line 87 of file ross-types.h.

◆ final_f

typedef void(* final_f) (void *sv, tw_lp *me)

Definition at line 90 of file ross-types.h.

◆ init_f

typedef void(* init_f) (void *sv, tw_lp *me)

Definition at line 82 of file ross-types.h.

◆ map_custom_f

typedef void(* map_custom_f) (void)

Definition at line 85 of file ross-types.h.

◆ map_f

typedef tw_peid(* map_f) (tw_lpid)

Definition at line 83 of file ross-types.h.

◆ map_local_f

typedef tw_lp *(* map_local_f) (tw_lpid)

Definition at line 84 of file ross-types.h.

◆ pe_final_f

typedef void(* pe_final_f) (tw_pe *pe)

Definition at line 62 of file ross-types.h.

◆ pe_gvt_f

typedef void(* pe_gvt_f) (tw_pe *pe)

Definition at line 61 of file ross-types.h.

◆ pe_init_f

typedef void(* pe_init_f) (tw_pe *pe)

Definition at line 60 of file ross-types.h.

◆ pre_run_f

typedef void(* pre_run_f) (void *sv, tw_lp *me)

Definition at line 86 of file ross-types.h.

◆ revent_f

typedef void(* revent_f) (void *sv, tw_bf *cv, void *msg, tw_lp *me)

Definition at line 88 of file ross-types.h.

◆ tw_bf

typedef struct tw_bf tw_bf

Definition at line 22 of file ross-types.h.

◆ tw_event

typedef struct tw_event tw_event

Definition at line 24 of file ross-types.h.

◆ tw_event_owner

Definition at line 237 of file ross-types.h.

◆ tw_event_sig

typedef struct tw_event_sig tw_event_sig

◆ tw_eventid

typedef unsigned int tw_eventid

Definition at line 56 of file ross-types.h.

◆ tw_eventq

typedef struct tw_eventq tw_eventq

Definition at line 23 of file ross-types.h.

◆ tw_kp

typedef struct tw_kp tw_kp

Definition at line 26 of file ross-types.h.

◆ tw_kpid

typedef tw_peid tw_kpid

tw_kpid – Kernel Process (KP) id

Definition at line 55 of file ross-types.h.

◆ tw_lp

typedef struct tw_lp tw_lp

Definition at line 25 of file ross-types.h.

◆ tw_lp_map

typedef enum tw_lp_map tw_lp_map

Definition at line 52 of file ross-types.h.

◆ tw_lptype

typedef struct tw_lptype tw_lptype

Definition at line 20 of file ross-types.h.

◆ tw_out

typedef struct tw_out tw_out

tw_out

Regularly requested feature: rollback-aware output. This will allow us to create an output stream without messages from cancelled events.

◆ tw_pe

typedef struct tw_pe tw_pe

Definition at line 27 of file ross-types.h.

◆ tw_petype

typedef struct tw_petype tw_petype

Definition at line 21 of file ross-types.h.

◆ tw_pq

typedef struct tw_pq tw_pq

Definition at line 16 of file ross-types.h.

◆ tw_stat

typedef unsigned long long tw_stat

Definition at line 58 of file ross-types.h.

◆ tw_statistics

typedef struct tw_statistics tw_statistics

Definition at line 15 of file ross-types.h.

◆ tw_synch

typedef enum tw_synch_e tw_synch

Definition at line 45 of file ross-types.h.

◆ tw_typemap_f

typedef tw_lpid(* tw_typemap_f) (tw_lpid gid)

Definition at line 109 of file ross-types.h.

◆ tw_unique_event_id

Enumeration Type Documentation

◆ tw_event_owner

Enumerator
TW_pe_event_q 

In a tw_pe.event_q list.

TW_pe_pq 

In a tw_pe.pq.

TW_kp_pevent_q 

In a tw_kp.pevent_q.

TW_pe_anti_msg 

Anti-message.

TW_net_outq 

Pending network transmission.

TW_net_asend 

Network transmission in progress.

TW_net_acancel 

Network transmission in progress.

TW_pe_sevent_q 

In tw_pe.sevent_q.

TW_pe_free_q 

In tw_pe.free_q.

Definition at line 223 of file ross-types.h.

◆ tw_lp_map

enum tw_lp_map
Enumerator
LINEAR 
ROUND_ROBIN 
CUSTOM 

Definition at line 47 of file ross-types.h.

◆ tw_synch_e

enum tw_synch_e

Synchronization protocol used

Enumerator
NO_SYNCH 
SEQUENTIAL 
CONSERVATIVE 
OPTIMISTIC 
OPTIMISTIC_DEBUG 
OPTIMISTIC_REALTIME 
SEQUENTIAL_ROLLBACK_CHECK 

Definition at line 35 of file ross-types.h.

Function Documentation

◆ min_int()

int min_int ( int x,
int y )
inlinestatic

Definition at line 503 of file ross-types.h.

Referenced by tw_event_sig_compare_ptr().

◆ tw_copy_event_sig()

◆ tw_event_sig_compare_ptr()

◆ tw_unique_event_id_eq()

int tw_unique_event_id_eq ( tw_unique_event_id e,
tw_unique_event_id n )
inlinestatic

Definition at line 480 of file ross-types.h.

References tw_causal_origin::event_id, and tw_causal_origin::pe_id.

Variable Documentation

◆ g_tw_max_sig