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
sds
margo
Commits
3359135c
Commit
3359135c
authored
Mar 06, 2017
by
Philip Carns
Browse files
fix bugs in pool ptrs
parent
0aa00de4
Changes
1
Hide whitespace changes
Inline
Side-by-side
examples/multiplex/margo-example-mp-server.c
View file @
3359135c
...
@@ -62,6 +62,7 @@ int main(int argc, char **argv)
...
@@ -62,6 +62,7 @@ int main(int argc, char **argv)
hg_size_t
addr_self_string_sz
=
128
;
hg_size_t
addr_self_string_sz
=
128
;
ABT_xstream
svc1_xstream2
;
ABT_xstream
svc1_xstream2
;
ABT_pool
svc1_pool2
;
ABT_pool
svc1_pool2
;
ABT_pool
*
handler_pool
;
if
(
argc
!=
2
)
if
(
argc
!=
2
)
{
{
...
@@ -144,7 +145,8 @@ int main(int argc, char **argv)
...
@@ -144,7 +145,8 @@ int main(int argc, char **argv)
/* register svc1, with mplex_id 1, to execute on the default handler pool
/* register svc1, with mplex_id 1, to execute on the default handler pool
* used by Margo
* used by Margo
*/
*/
ret
=
svc1_register
(
mid
,
margo_get_handler_pool
(
mid
),
1
);
handler_pool
=
margo_get_handler_pool
(
mid
);
ret
=
svc1_register
(
mid
,
*
handler_pool
,
1
);
assert
(
ret
==
0
);
assert
(
ret
==
0
);
/* create a dedicated and pool for another instance of svc1 */
/* create a dedicated and pool for another instance of svc1 */
...
@@ -160,7 +162,8 @@ int main(int argc, char **argv)
...
@@ -160,7 +162,8 @@ int main(int argc, char **argv)
/* register svc2, with mplex_id 3, to execute on the default handler pool
/* register svc2, with mplex_id 3, to execute on the default handler pool
* used by Margo
* used by Margo
*/
*/
ret
=
svc2_register
(
mid
,
margo_get_handler_pool
(
mid
),
3
);
handler_pool
=
margo_get_handler_pool
(
mid
);
ret
=
svc2_register
(
mid
,
*
handler_pool
,
3
);
assert
(
ret
==
0
);
assert
(
ret
==
0
);
...
@@ -174,9 +177,9 @@ int main(int argc, char **argv)
...
@@ -174,9 +177,9 @@ int main(int argc, char **argv)
*/
*/
margo_wait_for_finalize
(
mid
);
margo_wait_for_finalize
(
mid
);
svc1_deregister
(
mid
,
margo_get_
handler_pool
(
mid
)
,
1
);
svc1_deregister
(
mid
,
*
handler_pool
,
1
);
svc1_deregister
(
mid
,
margo_get_handler_pool
(
mid
)
,
2
);
svc1_deregister
(
mid
,
svc1_pool2
,
2
);
svc2_deregister
(
mid
,
margo_get_
handler_pool
(
mid
)
,
3
);
svc2_deregister
(
mid
,
*
handler_pool
,
3
);
ABT_xstream_join
(
svc1_xstream2
);
ABT_xstream_join
(
svc1_xstream2
);
ABT_xstream_free
(
&
svc1_xstream2
);
ABT_xstream_free
(
&
svc1_xstream2
);
...
...
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