MySQL  8.0.20
Source Code Documentation
xcom_base.h File Reference

Go to the source code of this file.

Classes

struct  add_args
 

Macros

#define XCOM_THREAD_DEBUG   1
 
#define SET_EXECUTED_MSG(x)
 
#define RESET_CLIENT_MSG
 
#define APP   ep->client_msg->p->a
 
#define XAPP   ep->p->learner.msg->a
 
#define FIND_MAX   (MIN_LENGTH / 10)
 
#define PLP   msg->payload.manager_message_payload_u
 
#define SET_REP_TYPE(quark, ptr)
 
#define x_state_list
 
#define x_actions
 
#define X(a)   a,
 
#define XCOM_COMMS_ERROR   1
 
#define XCOM_COMMS_OTHER   2
 
#define XCOM_COMMS_OK   0
 
#define XCOM_FSM(action, arg)
 

Typedefs

typedef unsigned long long synode_cnt
 
typedef enum xcom_state xcom_state
 
typedef enum xcom_actions xcom_actions
 
typedef struct add_args add_args
 
typedef void(* xcom_data_receiver) (synode_no message_id, node_set nodes, u_int size, synode_no last_removed, char *data)
 
typedef void(* xcom_local_view_receiver) (synode_no message_id, node_set nodes)
 
typedef void(* xcom_global_view_receiver) (synode_no config_id, synode_no message_id, node_set nodes, xcom_event_horizon)
 
typedef void(* app_snap_handler) (blob *gcs_snap)
 
typedef synode_no(* app_snap_getter) (blob *gcs_snap)
 
typedef void(* xcom_state_change_cb) (int status)
 
typedef int(* should_exit_getter) ()
 
typedef xcom_input_request_ptr(* xcom_input_try_pop_cb) (void)
 
typedef int(* xcom_socket_accept_cb) (int fd, site_def const *config)
 
typedef struct pax_machine pax_machine
 

Enumerations

enum  xcom_state { x_state_list }
 
enum  xcom_actions { x_actions }
 

Functions

void * xcom_thread_main (void *cp)
 
synode_no vp_count_to_synode (u_long high, u_long low, node_no nodeid, uint32_t groupid)
 
synode_no incr_synode (synode_no synode)
 
synode_no decr_synode (synode_no synode)
 
void broadcast_recover_end ()
 
char * dbg_pax_msg (pax_msg const *p)
 
pax_msg * dispatch_op (site_def const *site, pax_msg *p, linkage *reply_queue)
 
synode_no set_executed_msg (synode_no msgno)
 
void request_values (synode_no find, synode_no end)
 
void set_group (uint32_t id)
 Set node group. More...
 
void check_tasks ()
 
int xcom_booted ()
 
int iamthegreatest (site_def const *s)
 
void xcom_send (app_data_ptr a, pax_msg *msg)
 
void deliver_view_msg (site_def const *site)
 Deliver a view message. More...
 
int reply_handler_task (task_arg arg)
 
int acceptor_learner_task (task_arg arg)
 
synode_no get_max_synode ()
 
void xcom_thread_deinit ()
 
int taskmain (xcom_port listen_port)
 
void xcom_thread_init ()
 
site_definstall_node_group (app_data_ptr a)
 
int xcom_taskmain (xcom_port listen_port)
 
int xcom_taskmain2 (xcom_port listen_port)
 
void set_max_synode (synode_no synode)
 
synode_no set_current_message (synode_no msgno)
 
void xcom_send_data (uint32_t size, char *data)
 
bool_t must_force_recover ()
 
channelget_prop_input_queue ()
 
int is_real_recover (app_data_ptr a)
 
void init_xcom_base ()
 
void set_force_recover (bool_t const x)
 
void add_to_cache (app_data_ptr a, synode_no synode)
 
uint32_t new_id ()
 Create a new (hopefully unique) ID. More...
 
synode_no get_boot_key ()
 
site_def const * get_executor_site ()
 
site_def const * get_proposer_site ()
 
synode_no get_current_message ()
 
void start_run_tasks ()
 
int is_node_v4_reachable (char *node_address)
 
int is_node_v4_reachable_with_info (struct addrinfo *retrieved_addr_info)
 
int are_we_allowed_to_upgrade_to_v6 (app_data_ptr a)
 
struct addrinfo * does_node_have_v4_address (struct addrinfo *retrieved)
 Retreives a node IPv4 address, if it exists. More...
 
synode_no xcom_get_last_removed_from_cache ()
 
void xcom_add_node (char *addr, xcom_port port, node_list *nl)
 
xcom_state xcom_fsm (xcom_actions action, task_arg fsmargs)
 
void site_post_install_action (site_def *site)
 
void site_install_action (site_def *site, cargo_type operation)
 
void send_client_add_node (char *srv, xcom_port port, node_list *nl)
 
void send_client_remove_node (char *srv, xcom_port port, node_list *nl)
 
void set_xcom_data_receiver (xcom_data_receiver x)
 
void set_xcom_local_view_receiver (xcom_local_view_receiver x)
 
void set_xcom_global_view_receiver (xcom_global_view_receiver x)
 
void set_xcom_logger (xcom_logger x)
 
void set_xcom_debugger (xcom_debugger x)
 
void set_xcom_debugger_check (xcom_debugger_check x)
 
void set_app_snap_handler (app_snap_handler x)
 
void set_app_snap_getter (app_snap_getter x)
 
void set_xcom_run_cb (xcom_state_change_cb x)
 
void set_xcom_terminate_cb (xcom_state_change_cb x)
 
void set_xcom_exit_cb (xcom_state_change_cb x)
 
void set_xcom_expel_cb (xcom_state_change_cb x)
 
void set_should_exit_getter (should_exit_getter x)
 
app_data_ptr init_config_with_group (app_data *a, node_list *nl, cargo_type type, uint32_t group_id)
 
app_data_ptr init_set_event_horizon_msg (app_data *a, uint32_t group_id, xcom_event_horizon event_horizon)
 
app_data_ptr init_set_cache_size_msg (app_data *a, uint64_t cache_limit)
 
app_data_ptr init_get_event_horizon_msg (app_data *a, uint32_t group_id)
 
app_data_ptr init_app_msg (app_data *a, char *payload, u_int payload_size)
 
app_data_ptr init_terminate_command (app_data *a)
 
void terminate_and_exit ()
 
void set_xcom_input_try_pop_cb (xcom_input_try_pop_cb pop)
 
bool xcom_input_new_signal_connection (char const *address, xcom_port port)
 
bool xcom_input_signal (void)
 
void xcom_input_free_signal_connection (void)
 
int set_xcom_socket_accept_cb (xcom_socket_accept_cb x)
 
connection_descriptorxcom_open_client_connection (const char *server, xcom_port port)
 
int xcom_close_client_connection (connection_descriptor *connection)
 
int xcom_client_disable_arbitrator (connection_descriptor *fd)
 
int xcom_client_enable_arbitrator (connection_descriptor *fd)
 
int xcom_client_add_node (connection_descriptor *fd, node_list *nl, uint32_t group_id)
 
int xcom_client_boot (connection_descriptor *fd, node_list *nl, uint32_t group_id)
 
int xcom_client_force_add_node (connection_descriptor *fd, node_list *nl, uint32_t group_id)
 
int xcom_client_force_config (connection_descriptor *fd, node_list *nl, uint32_t group_id)
 
int xcom_client_force_remove_node (connection_descriptor *fd, node_list *nl, uint32_t group_id)
 
int xcom_client_remove_node (connection_descriptor *fd, node_list *nl, uint32_t group_id)
 
int64_t xcom_client_send_die (connection_descriptor *fd)
 
int64_t xcom_client_send_data (uint32_t size, char *data, connection_descriptor *fd)
 
xcom_event_horizon xcom_get_minimum_event_horizon ()
 
xcom_event_horizon xcom_get_maximum_event_horizon ()
 
int xcom_client_get_event_horizon (connection_descriptor *fd, uint32_t group_id, xcom_event_horizon *event_horizon)
 
int xcom_client_set_event_horizon (connection_descriptor *fd, uint32_t group_id, xcom_event_horizon event_horizon)
 
int xcom_client_terminate_and_exit (connection_descriptor *fd)
 
int xcom_client_set_cache_limit (connection_descriptor *fd, uint64_t cache_limit)
 
int xcom_client_get_synode_app_data (connection_descriptor *const fd, uint32_t group_id, synode_no_array *const synodes, synode_app_data_array *const reply)
 
int xcom_client_convert_into_local_server (connection_descriptor *const fd)
 
int64_t xcom_send_client_app_data (connection_descriptor *fd, app_data_ptr a, int force)
 
bool_t safe_app_data_copy (pax_msg **target, app_data_ptr source)
 Copies app data source into target and checks if the copy succeeded. More...
 
void prepare_push_3p (site_def const *site, pax_machine *p, pax_msg *msg, synode_no msgno, pax_msg_type msg_type)
 Initializes the message msg to go through a 3-phase, regular Paxos. More...
 
void init_prepare_msg (pax_msg *p)
 Initializes the message p as a Prepare message, as in the message for Phase 1 (a) of the Paxos protocol. More...
 
pax_msg * create_noop (pax_msg *p)
 Initializes the message p as a Prepare message for a no-op, as in the message for Phase 1 (a) of the Paxos protocol. More...
 
pax_msg * handle_simple_prepare (pax_machine *p, pax_msg *pm, synode_no synode)
 Process the incoming Prepare message from a Proposer, as in the message for Phase 1 (a) of the Paxos protocol. More...
 
bool_t handle_simple_ack_prepare (site_def const *site, pax_machine *p, pax_msg *m)
 Process the incoming acknowledge from an Acceptor to a sent Prepare, as in the message for Phase 1 (b) of the Paxos protocol. More...
 
void prepare_push_2p (site_def const *site, pax_machine *p)
 Initializes the proposer's message to go through a 2-phase Paxos on the proposer's reserved ballot (0,_). More...
 
void init_propose_msg (pax_msg *p)
 Initializes the message p as an Accept message, as in the message for Phase 2 (a) of the Paxos protocol. More...
 
pax_msg * handle_simple_accept (pax_machine *p, pax_msg *m, synode_no synode)
 Process the incoming Accept from a Proposer, as in the message for Phase 2 (a) of the Paxos protocol. More...
 
pax_msg * handle_simple_ack_accept (site_def const *site, pax_machine *p, pax_msg *m)
 Process the incoming acknowledge from an Acceptor to a sent Accept, as in the message for Phase 2 (b) of the Paxos protocol. More...
 
void handle_tiny_learn (site_def const *site, pax_machine *pm, pax_msg *p)
 Process the incoming tiny, i.e. More...
 
void handle_learn (site_def const *site, pax_machine *p, pax_msg *m)
 Process the incoming Learn message. More...
 
int pm_finished (pax_machine *p)
 
bool should_handle_boot (site_def const *site, pax_msg *p)
 
void init_need_boot_op (pax_msg *p, node_address *identity)
 Initializes the message p as a need_boot_op message. More...
 
static char * strerr_msg (char *buf, size_t len, int nr)
 
void set_xcom_comms_cb (xcom_state_change_cb x)
 
synode_no get_delivered_msg ()
 
void set_max_synode_from_unified_boot (synode_no unified_boot_synode)
 

Variables

int ARBITRATOR_HACK
 
task_arg null_arg
 
const char * xcom_state_name []
 
const char * xcom_actions_name []
 

Macro Definition Documentation

◆ APP

#define APP   ep->client_msg->p->a

◆ FIND_MAX

#define FIND_MAX   (MIN_LENGTH / 10)

◆ PLP

#define PLP   msg->payload.manager_message_payload_u

◆ RESET_CLIENT_MSG

#define RESET_CLIENT_MSG
Value:
if (ep->client_msg) { \
msg_link_delete(&ep->client_msg); \
}

◆ SET_EXECUTED_MSG

#define SET_EXECUTED_MSG (   x)
Value:
do { \
MAY_DBG(FN); \
set_executed_msg(x); \
} while (0)
#define FN
Definition: gcs_debug.h:217

◆ SET_REP_TYPE

#define SET_REP_TYPE (   quark,
  ptr 
)
Value:
q = (quark); \
object = PLP.ptr
synode_no q[FIFO_SIZE]
Definition: xcom_base.c:2938
#define PLP
Definition: xcom_base.h:131

◆ X

#define X (   a)    a,

◆ x_actions

#define x_actions
Value:
X(xa_wait) \
X(xa_poll) \
X(xa_init) \
X(xa_u_boot) \
X(xa_add) \
X(xa_net_boot) \
X(xa_force_config) \
X(xa_snapshot) \
X(xa_snapshot_wait) \
X(xa_need_snapshot) X(xa_complete) X(xa_terminate) X(xa_exit) X(xa_timeout)
#define X(a)
Definition: xcom_base.h:150

◆ x_state_list

#define x_state_list
Value:
X(x_start) \
X(x_boot) X(x_recover) X(x_run) X(x_done) X(x_snapshot_wait) X(x_recover_wait)
#define X(a)
Definition: xcom_base.h:150

◆ XAPP

#define XAPP   ep->p->learner.msg->a

◆ XCOM_COMMS_ERROR

#define XCOM_COMMS_ERROR   1

◆ XCOM_COMMS_OK

#define XCOM_COMMS_OK   0

◆ XCOM_COMMS_OTHER

#define XCOM_COMMS_OTHER   2

◆ XCOM_FSM

#define XCOM_FSM (   action,
  arg 
)
Value:
do { \
const char *s = xcom_state_name[xcom_fsm(action, arg)]; \
G_TRACE("%f %s:%d", seconds(), __FILE__, __LINE__); \
G_DEBUG("new state %s", s); \
} while (0)
double seconds()
Definition: task.c:298
xcom_state xcom_fsm(xcom_actions action, task_arg fsmargs)
Definition: xcom_base.c:5548
const char * xcom_state_name[]
Definition: xcom_base.c:5473

◆ XCOM_THREAD_DEBUG

#define XCOM_THREAD_DEBUG   1

Typedef Documentation

◆ add_args

typedef struct add_args add_args

◆ app_snap_getter

typedef synode_no(* app_snap_getter) (blob *gcs_snap)

◆ app_snap_handler

typedef void(* app_snap_handler) (blob *gcs_snap)

◆ pax_machine

typedef struct pax_machine pax_machine

◆ should_exit_getter

typedef int(* should_exit_getter) ()

◆ synode_cnt

typedef unsigned long long synode_cnt

◆ xcom_actions

typedef enum xcom_actions xcom_actions

◆ xcom_data_receiver

typedef void(* xcom_data_receiver) (synode_no message_id, node_set nodes, u_int size, synode_no last_removed, char *data)

◆ xcom_global_view_receiver

typedef void(* xcom_global_view_receiver) (synode_no config_id, synode_no message_id, node_set nodes, xcom_event_horizon)

◆ xcom_input_try_pop_cb

typedef xcom_input_request_ptr(* xcom_input_try_pop_cb) (void)

◆ xcom_local_view_receiver

typedef void(* xcom_local_view_receiver) (synode_no message_id, node_set nodes)

◆ xcom_socket_accept_cb

typedef int(* xcom_socket_accept_cb) (int fd, site_def const *config)

◆ xcom_state

typedef enum xcom_state xcom_state

◆ xcom_state_change_cb

typedef void(* xcom_state_change_cb) (int status)

Enumeration Type Documentation

◆ xcom_actions

Enumerator
x_actions 

◆ xcom_state

enum xcom_state
Enumerator
x_state_list 

Function Documentation

◆ acceptor_learner_task()

int acceptor_learner_task ( task_arg  arg)

◆ add_to_cache()

void add_to_cache ( app_data_ptr  a,
synode_no  synode 
)

◆ are_we_allowed_to_upgrade_to_v6()

int are_we_allowed_to_upgrade_to_v6 ( app_data_ptr  a)

◆ broadcast_recover_end()

void broadcast_recover_end ( )

◆ check_tasks()

void check_tasks ( )

◆ create_noop()

pax_msg* create_noop ( pax_msg *  p)

Initializes the message p as a Prepare message for a no-op, as in the message for Phase 1 (a) of the Paxos protocol.

Executed by Proposers.

Parameters
pThe no-op message to send
Return values
createdpaxos message of type no_op

◆ dbg_pax_msg()

char* dbg_pax_msg ( pax_msg const *  p)

◆ decr_synode()

synode_no decr_synode ( synode_no  synode)

◆ deliver_view_msg()

void deliver_view_msg ( site_def const *  site)

Deliver a view message.

◆ dispatch_op()

pax_msg* dispatch_op ( site_def const *  site,
pax_msg *  p,
linkage reply_queue 
)

◆ does_node_have_v4_address()

struct addrinfo* does_node_have_v4_address ( struct addrinfo *  retrieved)

Retreives a node IPv4 address, if it exists.

If a node is v4 reachable, means one of two:

  • The raw address is V4
  • a name was resolved to a V4/V6 address

If the later is the case, we are going to prefer the first v4 address in the list, since it is the common language between old and new version. If you want exclusive V6, please configure your DNS server to serve V6 names

Parameters
retrieveda previously retrieved struct addrinfo
Returns
struct addrinfo* An addrinfo of the first IPv4 address. Else it will return the entry parameter.

◆ get_boot_key()

synode_no get_boot_key ( )

◆ get_current_message()

synode_no get_current_message ( )

◆ get_delivered_msg()

synode_no get_delivered_msg ( )

◆ get_executor_site()

site_def const* get_executor_site ( )

◆ get_max_synode()

synode_no get_max_synode ( )

◆ get_prop_input_queue()

channel* get_prop_input_queue ( )

◆ get_proposer_site()

site_def const* get_proposer_site ( )

◆ handle_learn()

void handle_learn ( site_def const *  site,
pax_machine p,
pax_msg *  m 
)

Process the incoming Learn message.

Executed by Learners.

Parameters
siteXCom configuration
pPaxos instance
mIncoming message

◆ handle_simple_accept()

pax_msg* handle_simple_accept ( pax_machine p,
pax_msg *  m,
synode_no  synode 
)

Process the incoming Accept from a Proposer, as in the message for Phase 2 (a) of the Paxos protocol.

Executed by Acceptors.

Parameters
pPaxos instance
mIncoming Accept message
synodeSynode of the Paxos instance/Accept message
Return values
pax_msg*the reply to send to the Proposer (as in the Phase 2 (b) message of the Paxos protocol) if the Acceptor accepts the Accept
NULLotherwise

◆ handle_simple_ack_accept()

pax_msg* handle_simple_ack_accept ( site_def const *  site,
pax_machine p,
pax_msg *  m 
)

Process the incoming acknowledge from an Acceptor to a sent Accept, as in the message for Phase 2 (b) of the Paxos protocol.

Executed by Proposers.

Parameters
siteXCom configuration
pPaxos instance
mIncoming message
Return values
pax_msg*the Learn message to send to Leaners if a majority of Acceptors replied to the Proposer's Accept
NULLotherwise

◆ handle_simple_ack_prepare()

bool_t handle_simple_ack_prepare ( site_def const *  site,
pax_machine p,
pax_msg *  m 
)

Process the incoming acknowledge from an Acceptor to a sent Prepare, as in the message for Phase 1 (b) of the Paxos protocol.

Executed by Proposers.

Parameters
siteXCom configuration
pPaxos instance
mIncoming message
Return values
TRUEif a majority of Acceptors replied to the Proposer's Prepare
FALSEotherwise

◆ handle_simple_prepare()

pax_msg* handle_simple_prepare ( pax_machine p,
pax_msg *  pm,
synode_no  synode 
)

Process the incoming Prepare message from a Proposer, as in the message for Phase 1 (a) of the Paxos protocol.

Executed by Acceptors.

Parameters
pPaxos instance
pmIncoming Prepare message
synodeSynode of the Paxos instance/Accept message
Return values
pax_msg*the reply to send to the Proposer (as in the Phase 1 (b) message of the Paxos protocol) if the Acceptor accepts the Prepare
NULLotherwise

◆ handle_tiny_learn()

void handle_tiny_learn ( site_def const *  site,
pax_machine pm,
pax_msg *  p 
)

Process the incoming tiny, i.e.

without the learned value, Learn message. Executed by Learners.

Parameters
siteXCom configuration
pmPaxos instance
pIncoming message

◆ iamthegreatest()

int iamthegreatest ( site_def const *  s)

◆ incr_synode()

synode_no incr_synode ( synode_no  synode)

◆ init_app_msg()

app_data_ptr init_app_msg ( app_data *  a,
char *  payload,
u_int  payload_size 
)

◆ init_config_with_group()

app_data_ptr init_config_with_group ( app_data *  a,
node_list *  nl,
cargo_type  type,
uint32_t  group_id 
)

◆ init_get_event_horizon_msg()

app_data_ptr init_get_event_horizon_msg ( app_data *  a,
uint32_t  group_id 
)

◆ init_need_boot_op()

void init_need_boot_op ( pax_msg *  p,
node_address *  identity 
)

Initializes the message p as a need_boot_op message.

Parameters
pThe message to send
identityThe unique incarnation identifier of this XCom instance

◆ init_prepare_msg()

void init_prepare_msg ( pax_msg *  p)

Initializes the message p as a Prepare message, as in the message for Phase 1 (a) of the Paxos protocol.

Executed by Proposers.

Parameters
pThe message to send

◆ init_propose_msg()

void init_propose_msg ( pax_msg *  p)

Initializes the message p as an Accept message, as in the message for Phase 2 (a) of the Paxos protocol.

Executed by Proposers.

Parameters
pThe message to send

◆ init_set_cache_size_msg()

app_data_ptr init_set_cache_size_msg ( app_data *  a,
uint64_t  cache_limit 
)

◆ init_set_event_horizon_msg()

app_data_ptr init_set_event_horizon_msg ( app_data *  a,
uint32_t  group_id,
xcom_event_horizon  event_horizon 
)

◆ init_terminate_command()

app_data_ptr init_terminate_command ( app_data *  a)

◆ init_xcom_base()

void init_xcom_base ( )

Reset lsn

◆ install_node_group()

site_def* install_node_group ( app_data_ptr  a)

◆ is_node_v4_reachable()

int is_node_v4_reachable ( char *  node_address)

◆ is_node_v4_reachable_with_info()

int is_node_v4_reachable_with_info ( struct addrinfo *  retrieved_addr_info)

◆ is_real_recover()

int is_real_recover ( app_data_ptr  a)

◆ must_force_recover()

bool_t must_force_recover ( )

◆ new_id()

uint32_t new_id ( )

Create a new (hopefully unique) ID.

The basic idea is to create a hash from the host ID and a timestamp.

◆ pm_finished()

int pm_finished ( pax_machine p)
Return values
1if the value for the Paxos instance *p has been learned
0otherwise

◆ prepare_push_2p()

void prepare_push_2p ( site_def const *  site,
pax_machine p 
)

Initializes the proposer's message to go through a 2-phase Paxos on the proposer's reserved ballot (0,_).

Executed by Proposers.

Parameters
siteXCom configuration
pPaxos instance

◆ prepare_push_3p()

void prepare_push_3p ( site_def const *  site,
pax_machine p,
pax_msg *  msg,
synode_no  msgno,
pax_msg_type  msg_type 
)

Initializes the message msg to go through a 3-phase, regular Paxos.

Executed by Proposers.

Parameters
siteXCom configuration
pPaxos instance
msgMessage to send
msgnoSynode where msg will be proposed
msg_typeThe type of the message, e.g. normal or no_op

◆ reply_handler_task()

int reply_handler_task ( task_arg  arg)

◆ request_values()

void request_values ( synode_no  find,
synode_no  end 
)

◆ safe_app_data_copy()

bool_t safe_app_data_copy ( pax_msg **  target,
app_data_ptr  source 
)

Copies app data source into target and checks if the copy succeeded.

Sets *target to NULL if the copy fails.

Parameters
[in,out]targetThe pax_msg to which the app_data will be copied.
sourceThe app data that will be copied.
Return values
TRUEif the copy was successful.
FALSEif the copy failed, in which case *target is set to NULL; a failed copy means that there was an error allocating memory for the copy.

◆ send_client_add_node()

void send_client_add_node ( char *  srv,
xcom_port  port,
node_list *  nl 
)

◆ send_client_remove_node()

void send_client_remove_node ( char *  srv,
xcom_port  port,
node_list *  nl 
)

◆ set_app_snap_getter()

void set_app_snap_getter ( app_snap_getter  x)

◆ set_app_snap_handler()

void set_app_snap_handler ( app_snap_handler  x)

◆ set_current_message()

synode_no set_current_message ( synode_no  msgno)

◆ set_executed_msg()

synode_no set_executed_msg ( synode_no  msgno)

◆ set_force_recover()

void set_force_recover ( bool_t const  x)

◆ set_group()

void set_group ( uint32_t  id)

Set node group.

◆ set_max_synode()

void set_max_synode ( synode_no  synode)

◆ set_max_synode_from_unified_boot()

void set_max_synode_from_unified_boot ( synode_no  unified_boot_synode)

◆ set_should_exit_getter()

void set_should_exit_getter ( should_exit_getter  x)

◆ set_xcom_comms_cb()

void set_xcom_comms_cb ( xcom_state_change_cb  x)

◆ set_xcom_data_receiver()

void set_xcom_data_receiver ( xcom_data_receiver  x)

◆ set_xcom_debugger()

void set_xcom_debugger ( xcom_debugger  x)

◆ set_xcom_debugger_check()

void set_xcom_debugger_check ( xcom_debugger_check  x)

◆ set_xcom_exit_cb()

void set_xcom_exit_cb ( xcom_state_change_cb  x)

◆ set_xcom_expel_cb()

void set_xcom_expel_cb ( xcom_state_change_cb  x)

◆ set_xcom_global_view_receiver()

void set_xcom_global_view_receiver ( xcom_global_view_receiver  x)

◆ set_xcom_input_try_pop_cb()

void set_xcom_input_try_pop_cb ( xcom_input_try_pop_cb  pop)

◆ set_xcom_local_view_receiver()

void set_xcom_local_view_receiver ( xcom_local_view_receiver  x)

◆ set_xcom_logger()

void set_xcom_logger ( xcom_logger  x)

◆ set_xcom_run_cb()

void set_xcom_run_cb ( xcom_state_change_cb  x)

◆ set_xcom_socket_accept_cb()

int set_xcom_socket_accept_cb ( xcom_socket_accept_cb  x)

◆ set_xcom_terminate_cb()

void set_xcom_terminate_cb ( xcom_state_change_cb  x)

◆ should_handle_boot()

bool should_handle_boot ( site_def const *  site,
pax_msg *  p 
)
Returns
true if we should process the incoming need_boot_op message passed in parameter p.

◆ site_install_action()

void site_install_action ( site_def site,
cargo_type  operation 
)

◆ site_post_install_action()

void site_post_install_action ( site_def site)

◆ start_run_tasks()

void start_run_tasks ( )

◆ strerr_msg()

static char* strerr_msg ( char *  buf,
size_t  len,
int  nr 
)
inlinestatic

◆ taskmain()

int taskmain ( xcom_port  listen_port)

◆ terminate_and_exit()

void terminate_and_exit ( )

◆ vp_count_to_synode()

synode_no vp_count_to_synode ( u_long  high,
u_long  low,
node_no  nodeid,
uint32_t  groupid 
)

◆ xcom_add_node()

void xcom_add_node ( char *  addr,
xcom_port  port,
node_list *  nl 
)

◆ xcom_booted()

int xcom_booted ( )

◆ xcom_client_add_node()

int xcom_client_add_node ( connection_descriptor fd,
node_list *  nl,
uint32_t  group_id 
)

◆ xcom_client_boot()

int xcom_client_boot ( connection_descriptor fd,
node_list *  nl,
uint32_t  group_id 
)

◆ xcom_client_convert_into_local_server()

int xcom_client_convert_into_local_server ( connection_descriptor *const  fd)

◆ xcom_client_disable_arbitrator()

int xcom_client_disable_arbitrator ( connection_descriptor fd)

◆ xcom_client_enable_arbitrator()

int xcom_client_enable_arbitrator ( connection_descriptor fd)

◆ xcom_client_force_add_node()

int xcom_client_force_add_node ( connection_descriptor fd,
node_list *  nl,
uint32_t  group_id 
)

◆ xcom_client_force_config()

int xcom_client_force_config ( connection_descriptor fd,
node_list *  nl,
uint32_t  group_id 
)

◆ xcom_client_force_remove_node()

int xcom_client_force_remove_node ( connection_descriptor fd,
node_list *  nl,
uint32_t  group_id 
)

◆ xcom_client_get_event_horizon()

int xcom_client_get_event_horizon ( connection_descriptor fd,
uint32_t  group_id,
xcom_event_horizon *  event_horizon 
)

◆ xcom_client_get_synode_app_data()

int xcom_client_get_synode_app_data ( connection_descriptor *const  fd,
uint32_t  group_id,
synode_no_array *const  synodes,
synode_app_data_array *const  reply 
)

◆ xcom_client_remove_node()

int xcom_client_remove_node ( connection_descriptor fd,
node_list *  nl,
uint32_t  group_id 
)

◆ xcom_client_send_data()

int64_t xcom_client_send_data ( uint32_t  size,
char *  data,
connection_descriptor fd 
)

◆ xcom_client_send_die()

int64_t xcom_client_send_die ( connection_descriptor fd)

◆ xcom_client_set_cache_limit()

int xcom_client_set_cache_limit ( connection_descriptor fd,
uint64_t  cache_limit 
)

◆ xcom_client_set_event_horizon()

int xcom_client_set_event_horizon ( connection_descriptor fd,
uint32_t  group_id,
xcom_event_horizon  event_horizon 
)

◆ xcom_client_terminate_and_exit()

int xcom_client_terminate_and_exit ( connection_descriptor fd)

◆ xcom_close_client_connection()

int xcom_close_client_connection ( connection_descriptor connection)

◆ xcom_fsm()

xcom_state xcom_fsm ( xcom_actions  action,
task_arg  fsmargs 
)

◆ xcom_get_last_removed_from_cache()

synode_no xcom_get_last_removed_from_cache ( )

◆ xcom_get_maximum_event_horizon()

xcom_event_horizon xcom_get_maximum_event_horizon ( )

◆ xcom_get_minimum_event_horizon()

xcom_event_horizon xcom_get_minimum_event_horizon ( )

◆ xcom_input_free_signal_connection()

void xcom_input_free_signal_connection ( void  )

◆ xcom_input_new_signal_connection()

bool xcom_input_new_signal_connection ( char const *  address,
xcom_port  port 
)

◆ xcom_input_signal()

bool xcom_input_signal ( void  )

◆ xcom_open_client_connection()

connection_descriptor* xcom_open_client_connection ( const char *  server,
xcom_port  port 
)

◆ xcom_send()

void xcom_send ( app_data_ptr  a,
pax_msg *  msg 
)

◆ xcom_send_client_app_data()

int64_t xcom_send_client_app_data ( connection_descriptor fd,
app_data_ptr  a,
int  force 
)

◆ xcom_send_data()

void xcom_send_data ( uint32_t  size,
char *  data 
)

◆ xcom_taskmain()

int xcom_taskmain ( xcom_port  listen_port)

◆ xcom_taskmain2()

int xcom_taskmain2 ( xcom_port  listen_port)

◆ xcom_thread_deinit()

void xcom_thread_deinit ( )

◆ xcom_thread_init()

void xcom_thread_init ( )

◆ xcom_thread_main()

void* xcom_thread_main ( void *  cp)

Variable Documentation

◆ ARBITRATOR_HACK

int ARBITRATOR_HACK

◆ null_arg

task_arg null_arg

◆ xcom_actions_name

const char* xcom_actions_name[]

◆ xcom_state_name

const char* xcom_state_name[]