MySQL  8.0.20
Source Code Documentation
app_data.c File Reference


#define insert_sort_gt(a, b)   synode_gt(a->app_key, b->app_key)


 clone_xdr_array (synode_no)
 Debug a single app_data struct. More...
app_data_ptr clone_app_data (app_data_ptr a)
app_data_ptr clone_app_data_single (app_data_ptr a)
 Clone an app_data struct. More...
size_t node_set_size (node_set ns)
static size_t node_list_size (node_list nodes)
size_t synode_no_array_size (synode_no_array sa)
size_t app_data_size (app_data const *a)
 Return size of an app_data. More...
size_t app_data_list_size (app_data const *a)
static app_data_list nextp (app_data_list l)
 Return next element in list of app_data. More...
app_data_ptr new_app_data ()
 Constructor for app_data. More...
app_data_ptr init_app_data (app_data_ptr retval)
char * dbg_app_data (app_data_ptr a)
void _replace_app_data_list (app_data_list target, app_data_ptr source)
void follow (app_data_list l, app_data_ptr p)
 Insert p after l. More...
static unsigned long msg_count (app_data_ptr a)
 Count the number of messages in a list. More...
void sort_app_data (app_data_ptr x[], int n)
 Sort an array of app_data pointers. More...
app_data_ptr new_nodes (u_int n, node_address *names, cargo_type cargo)
app_data_ptr new_data (u_int n, char *val, cons_type consensus)
app_data_ptr new_reset (cargo_type type)
app_data_ptr new_exit ()

Macro Definition Documentation

◆ insert_sort_gt

#define insert_sort_gt (   a,
)    synode_gt(a->app_key, b->app_key)

Function Documentation

◆ _replace_app_data_list()

void _replace_app_data_list ( app_data_list  target,
app_data_ptr  source 

◆ app_data_list_size()

size_t app_data_list_size ( app_data const *  a)

◆ app_data_size()

size_t app_data_size ( app_data const *  a)

Return size of an app_data.

◆ clone_app_data()

app_data_ptr clone_app_data ( app_data_ptr  a)

◆ clone_app_data_single()

app_data_ptr clone_app_data_single ( app_data_ptr  a)

Clone an app_data struct.

◆ clone_xdr_array()

clone_xdr_array ( synode_no  )

Debug a single app_data struct.

◆ dbg_app_data()

char* dbg_app_data ( app_data_ptr  a)

◆ follow()

void follow ( app_data_list  l,
app_data_ptr  p 

Insert p after l.

◆ init_app_data()

app_data_ptr init_app_data ( app_data_ptr  retval)

◆ msg_count()

static unsigned long msg_count ( app_data_ptr  a)

Count the number of messages in a list.

◆ new_app_data()

app_data_ptr new_app_data ( )

Constructor for app_data.

◆ new_data()

app_data_ptr new_data ( u_int  n,
char *  val,
cons_type  consensus 

◆ new_exit()

app_data_ptr new_exit ( )

◆ new_nodes()

app_data_ptr new_nodes ( u_int  n,
node_address *  names,
cargo_type  cargo 

◆ new_reset()

app_data_ptr new_reset ( cargo_type  type)

◆ nextp()

static app_data_list nextp ( app_data_list  l)

Return next element in list of app_data.

◆ node_list_size()

static size_t node_list_size ( node_list  nodes)

◆ node_set_size()

size_t node_set_size ( node_set  ns)

◆ sort_app_data()

void sort_app_data ( app_data_ptr  x[],
int  n 

Sort an array of app_data pointers.

TODO: Maybe replace with Dewar's improved heap sort? Quicksort is not optimal here, since the log is typically already almost or completely sorted.

◆ synode_no_array_size()

size_t synode_no_array_size ( synode_no_array  sa)