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

adopting 'pre_run' lp interface change

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