Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Elsa Gonsiorowski
codes
Commits
70b52419
Commit
70b52419
authored
Aug 29, 2014
by
Jonathan Jenkins
Browse files
adopting 'pre_run' lp interface change
parent
75f273a5
Changes
11
Hide whitespace changes
Inline
Side-by-side
doc/example/example.c
View file @
70b52419
...
...
@@ -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
();
...
...
doc/example_heterogeneous/example.c
View file @
70b52419
...
...
@@ -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
(){
...
...
src/util/local-storage-model.c
View file @
70b52419
...
...
@@ -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
,
...
...
src/util/resource-lp.c
View file @
70b52419
...
...
@@ -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 ****/
...
...
src/util/templates/lp_template.c
View file @
70b52419
...
...
@@ -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 ****/
...
...
tests/local-storage-model-test.c
View file @
70b52419
...
...
@@ -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
);
...
...
tests/lp-io-test.c
View file @
70b52419
...
...
@@ -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
(
...
...
tests/mapping_test.c
View file @
70b52419
...
...
@@ -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'
};
...
...
tests/resource-test.c
View file @
70b52419
...
...
@@ -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'
};
...
...
tests/workload/codes-workload-test-cn-lp.c
View file @
70b52419
...
...
@@ -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
;
...
...
tests/workload/codes-workload-test-svr-lp.c
View file @
70b52419
...
...
@@ -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
(
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment