Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
margo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
17
Issues
17
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
sds
margo
Commits
5edc0ead
Commit
5edc0ead
authored
Aug 24, 2017
by
Shane Snyder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
define margo_set_target_id
parent
7318e084
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
8 deletions
+23
-8
examples/multiplex/svc1-client.c
examples/multiplex/svc1-client.c
+2
-4
examples/multiplex/svc2-client.c
examples/multiplex/svc2-client.c
+2
-4
include/margo.h
include/margo.h
+12
-0
src/margo.c
src/margo.c
+7
-0
No files found.
examples/multiplex/svc1-client.c
View file @
5edc0ead
...
...
@@ -54,8 +54,7 @@ void svc1_do_thing(margo_instance_id mid, hg_addr_t svr_addr, uint32_t mplex_id)
HG_BULK_READ_ONLY
,
&
in
.
bulk_handle
);
assert
(
hret
==
HG_SUCCESS
);
/* XXX */
HG_Set_target_id
(
handle
,
mplex_id
);
margo_set_target_id
(
handle
,
mplex_id
);
/* Send rpc. Note that we are also transmitting the bulk handle in the
* input struct. It was set above.
...
...
@@ -101,8 +100,7 @@ void svc1_do_other_thing(margo_instance_id mid, hg_addr_t svr_addr, uint32_t mpl
HG_BULK_READ_ONLY
,
&
in
.
bulk_handle
);
assert
(
hret
==
HG_SUCCESS
);
/* XXX */
HG_Set_target_id
(
handle
,
mplex_id
);
margo_set_target_id
(
handle
,
mplex_id
);
/* Send rpc. Note that we are also transmitting the bulk handle in the
* input struct. It was set above.
...
...
examples/multiplex/svc2-client.c
View file @
5edc0ead
...
...
@@ -53,8 +53,7 @@ void svc2_do_thing(margo_instance_id mid, hg_addr_t svr_addr, uint32_t mplex_id)
HG_BULK_READ_ONLY
,
&
in
.
bulk_handle
);
assert
(
hret
==
HG_SUCCESS
);
/* XXX */
HG_Set_target_id
(
handle
,
mplex_id
);
margo_set_target_id
(
handle
,
mplex_id
);
/* Send rpc. Note that we are also transmitting the bulk handle in the
* input struct. It was set above.
...
...
@@ -100,8 +99,7 @@ void svc2_do_other_thing(margo_instance_id mid, hg_addr_t svr_addr, uint32_t mpl
HG_BULK_READ_ONLY
,
&
in
.
bulk_handle
);
assert
(
hret
==
HG_SUCCESS
);
/* XXX */
HG_Set_target_id
(
handle
,
mplex_id
);
margo_set_target_id
(
handle
,
mplex_id
);
/* Send rpc. Note that we are also transmitting the bulk handle in the
* input struct. It was set above.
...
...
include/margo.h
View file @
5edc0ead
...
...
@@ -367,6 +367,18 @@ hg_return_t margo_free_output(
hg_handle_t
handle
,
void
*
out_struct
);
/**
* Set target ID that will receive and process RPC request.
*
* \param [in] handle Mercury handle
* \param [in] target_id user-defined target ID
*
* \return HG_SUCCESS or corresponding HG error code
*/
hg_return_t
margo_set_target_id
(
hg_handle_t
handle
,
hg_uint8_t
target_id
);
/**
* Forward an RPC request to a remote host
* @param [in] mid Margo instance
...
...
src/margo.c
View file @
5edc0ead
...
...
@@ -579,6 +579,13 @@ hg_return_t margo_free_output(
return
(
HG_Free_output
(
handle
,
out_struct
));
}
hg_return_t
margo_set_target_id
(
hg_handle_t
handle
,
hg_uint8_t
target_id
)
{
return
(
HG_Set_target_id
(
handle
,
target_id
));
}
static
hg_return_t
margo_cb
(
const
struct
hg_cb_info
*
info
)
{
hg_return_t
hret
=
info
->
ret
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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