Commit 70b52419 authored by Jonathan Jenkins's avatar Jonathan Jenkins

adopting 'pre_run' lp interface change

parent 75f273a5
......@@ -101,12 +101,13 @@ static void svr_finalize(
/* set up the function pointers for ROSS, as well as the size of the LP state
* structure (NOTE: ROSS is in charge of event and state (de-)allocation) */
tw_lptype svr_lp = {
(init_f) svr_init,
(event_f) svr_event,
(revent_f) svr_rev_event,
(final_f) svr_finalize,
(map_f) codes_mapping,
sizeof(svr_state),
(init_f) svr_init,
(pre_run_f) NULL,
(event_f) svr_event,
(revent_f) svr_rev_event,
(final_f) svr_finalize,
(map_f) codes_mapping,
sizeof(svr_state),
};
extern const tw_lptype* svr_get_lp_type();
......
......@@ -217,12 +217,13 @@ void node_event_handler(
/* ROSS function pointer table for this LP */
static tw_lptype node_lp = {
(init_f) node_lp_init,
(event_f) node_event_handler,
(revent_f) NULL,
(final_f) node_finalize,
(map_f) codes_mapping,
sizeof(node_state),
(init_f) node_lp_init,
(pre_run_f) NULL,
(event_f) node_event_handler,
(revent_f) NULL,
(final_f) node_finalize,
(map_f) codes_mapping,
sizeof(node_state),
};
void node_register(){
......@@ -341,12 +342,13 @@ void forwarder_event_handler(
}
static tw_lptype forwarder_lp = {
(init_f) forwarder_lp_init,
(event_f) forwarder_event_handler,
(revent_f) NULL,
(final_f) forwarder_finalize,
(map_f) codes_mapping,
sizeof(forwarder_state),
(init_f) forwarder_lp_init,
(pre_run_f) NULL,
(event_f) forwarder_event_handler,
(revent_f) NULL,
(final_f) forwarder_finalize,
(map_f) codes_mapping,
sizeof(forwarder_state),
};
void forwarder_register(){
......
......@@ -157,6 +157,7 @@ static const config_anno_map_t *anno_map = NULL;
tw_lptype lsm_lp =
{
(init_f) lsm_lp_init,
(pre_run_f) NULL,
(event_f) lsm_event,
(revent_f) lsm_rev_event,
(final_f) lsm_finalize,
......
......@@ -110,12 +110,13 @@ static void resource_finalize(
/* ROSS function pointer table for this LP */
static tw_lptype resource_lp = {
(init_f) resource_lp_ind_init,
(event_f) resource_event_handler,
(revent_f) resource_rev_handler,
(final_f) resource_finalize,
(map_f) codes_mapping,
sizeof(resource_state),
(init_f) resource_lp_ind_init,
(pre_run_f) NULL,
(event_f) resource_event_handler,
(revent_f) resource_rev_handler,
(final_f) resource_finalize,
(map_f) codes_mapping,
sizeof(resource_state),
};
/**** END LP, EVENT PROCESSING FUNCTION DECLS ****/
......
......@@ -77,12 +77,13 @@ static void handle_template_b_rev(
/* ROSS function pointer table for this LP */
tw_lptype template_lp = {
(init_f) template_lp_init,
(event_f) template_event_handler,
(revent_f) template_rev_handler,
(final_f) template_finalize,
(map_f) codes_mapping,
sizeof(template_state),
(init_f) template_lp_init,
(pre_run_f) NULL,
(event_f) template_event_handler,
(revent_f) template_rev_handler,
(final_f) template_finalize,
(map_f) codes_mapping,
sizeof(template_state),
};
/**** END LP, EVENT PROCESSING FUNCTION DECLS ****/
......
......@@ -78,12 +78,13 @@ static tw_peid svr_node_mapping(
tw_lpid gid);
tw_lptype svr_lp = {
(init_f) svr_init,
(event_f) svr_event,
(revent_f) svr_rev_event,
(final_f) svr_finalize,
(map_f) svr_node_mapping,
sizeof(svr_state),
(init_f) svr_init,
(pre_run_f) NULL,
(event_f) svr_event,
(revent_f) svr_rev_event,
(final_f) svr_finalize,
(map_f) svr_node_mapping,
sizeof(svr_state),
};
static tw_stime ns_to_s(tw_stime ns);
......
......@@ -63,12 +63,13 @@ static tw_peid svr_node_mapping(
tw_lpid gid);
tw_lptype svr_lp = {
(init_f) svr_init,
(event_f) svr_event,
(revent_f) svr_rev_event,
(final_f) svr_finalize,
(map_f) svr_node_mapping,
sizeof(svr_state),
(init_f) svr_init,
(pre_run_f) NULL,
(event_f) svr_event,
(revent_f) svr_rev_event,
(final_f) svr_finalize,
(map_f) svr_node_mapping,
sizeof(svr_state),
};
static void handle_kickoff_rev_event(
......
......@@ -86,28 +86,31 @@ static void init(state *ns, tw_lp *lp){
}
tw_lptype a_lp = {
(init_f) init,
(event_f) NULL,
(revent_f) NULL,
(final_f) NULL,
(map_f) codes_mapping,
sizeof(state),
(init_f) init,
(pre_run_f) NULL,
(event_f) NULL,
(revent_f) NULL,
(final_f) NULL,
(map_f) codes_mapping,
sizeof(state),
};
tw_lptype b_lp = {
(init_f) init,
(event_f) NULL,
(revent_f) NULL,
(final_f) NULL,
(map_f) codes_mapping,
sizeof(state),
(init_f) init,
(pre_run_f) NULL,
(event_f) NULL,
(revent_f) NULL,
(final_f) NULL,
(map_f) codes_mapping,
sizeof(state),
};
tw_lptype c_lp = {
(init_f) init,
(event_f) NULL,
(revent_f) NULL,
(final_f) NULL,
(map_f) codes_mapping,
sizeof(state),
(init_f) init,
(pre_run_f) NULL,
(event_f) NULL,
(revent_f) NULL,
(final_f) NULL,
(map_f) codes_mapping,
sizeof(state),
};
static char conf_file_name[128] = {'\0'};
......
......@@ -108,12 +108,13 @@ static void s_event_rc(s_state *ns, tw_bf * b, s_msg *m, tw_lp *lp){
}
static tw_lptype s_lp = {
(init_f) s_init,
(event_f) s_event,
(revent_f) s_event_rc,
(final_f) s_finalize,
(map_f) codes_mapping,
sizeof(s_state),
(init_f) s_init,
(pre_run_f) NULL,
(event_f) s_event,
(revent_f) s_event_rc,
(final_f) s_finalize,
(map_f) codes_mapping,
sizeof(s_state),
};
static char conf_file_name[128] = {'\0'};
......
......@@ -91,12 +91,13 @@ static tw_peid node_mapping(
tw_lpid gid);
tw_lptype client_lp = {
(init_f) client_init,
(event_f) client_event,
(revent_f) client_rev_event,
(final_f) client_finalize,
(map_f) node_mapping,
sizeof(client_state),
(init_f) client_init,
(pre_run_f) NULL,
(event_f) client_event,
(revent_f) client_rev_event,
(final_f) client_finalize,
(map_f) node_mapping,
sizeof(client_state),
};
static int g_num_clients = -1;
......
......@@ -57,12 +57,13 @@ static tw_peid node_mapping(
tw_lpid gid);
tw_lptype svr_lp = {
(init_f) svr_init,
(event_f) svr_event,
(revent_f) svr_rev_event,
(final_f) svr_finalize,
(map_f) node_mapping,
sizeof(svr_state),
(init_f) svr_init,
(pre_run_f) NULL,
(event_f) svr_event,
(revent_f) svr_rev_event,
(final_f) svr_finalize,
(map_f) node_mapping,
sizeof(svr_state),
};
static void handle_svr_op_event(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment