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
18
Issues
18
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
2676c8cf
Commit
2676c8cf
authored
Oct 26, 2018
by
Matthieu Dorier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added margo_registered_disabled_respone and margo_is_listening
parent
9393e587
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
0 deletions
+43
-0
include/margo.h
include/margo.h
+24
-0
src/margo.c
src/margo.c
+19
-0
No files found.
include/margo.h
View file @
2676c8cf
...
@@ -115,6 +115,16 @@ void margo_finalize(
...
@@ -115,6 +115,16 @@ void margo_finalize(
void
margo_wait_for_finalize
(
void
margo_wait_for_finalize
(
margo_instance_id
mid
);
margo_instance_id
mid
);
/**
* Checks whether a Margo instance we initialized as a server.
*
* @param [in] mid Margo instance
*
* @return HG_TRUE if listening or HG_FALSE if not, or not a valid margo instance.
*/
hg_bool_t
margo_is_listening
(
margo_instance_id
mid
);
/**
/**
* Installs a callback to be called before the margo instance is finalize.
* Installs a callback to be called before the margo instance is finalize.
* Callbacks installed will be called in reverse ordered than they have been
* Callbacks installed will be called in reverse ordered than they have been
...
@@ -291,6 +301,20 @@ hg_return_t margo_registered_disable_response(
...
@@ -291,6 +301,20 @@ hg_return_t margo_registered_disable_response(
hg_id_t
id
,
hg_id_t
id
,
int
disable_flag
);
int
disable_flag
);
/**
* Checks if response is disabled for a given RPC ID.
*
* @param [in] mid Margo instance
* @param [in] id registered function ID
* @param [ou] disabled_flag flag indicating whether response is disabled (1) or not (0)
*
* @return HG_SUCCESS or corresponding HG error code
*/
hg_return_t
margo_registered_disabled_response
(
margo_instance_id
mid
,
hg_id_t
id
,
int
*
disabled_flag
);
/**
/**
* Lookup an addr from a peer address/name.
* Lookup an addr from a peer address/name.
* \param [in] name lookup name
* \param [in] name lookup name
...
...
src/margo.c
View file @
2676c8cf
...
@@ -486,6 +486,13 @@ void margo_wait_for_finalize(margo_instance_id mid)
...
@@ -486,6 +486,13 @@ void margo_wait_for_finalize(margo_instance_id mid)
return
;
return
;
}
}
hg_bool_t
margo_is_listening
(
margo_instance_id
mid
)
{
if
(
!
mid
)
return
HG_FALSE
;
return
HG_Class_is_listening
(
mid
->
hg_class
);
}
void
margo_push_finalize_callback
(
void
margo_push_finalize_callback
(
margo_instance_id
mid
,
margo_instance_id
mid
,
void
(
*
cb
)(
void
*
),
void
(
*
cb
)(
void
*
),
...
@@ -613,6 +620,18 @@ hg_return_t margo_registered_disable_response(
...
@@ -613,6 +620,18 @@ hg_return_t margo_registered_disable_response(
return
(
HG_Registered_disable_response
(
mid
->
hg_class
,
id
,
disable_flag
));
return
(
HG_Registered_disable_response
(
mid
->
hg_class
,
id
,
disable_flag
));
}
}
hg_return_t
margo_registered_disabled_response
(
margo_instance_id
mid
,
hg_id_t
id
,
int
*
disabled_flag
)
{
hg_bool_t
b
;
hg_return_t
ret
=
HG_Registered_disabled_response
(
mid
->
hg_class
,
id
,
&
b
);
if
(
ret
!=
HG_SUCCESS
)
return
ret
;
*
disabled_flag
=
b
;
return
HG_SUCCESS
;
}
struct
lookup_cb_evt
struct
lookup_cb_evt
{
{
hg_return_t
hret
;
hg_return_t
hret
;
...
...
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