Add quorum_fd_get and votequorum_fd_get prototypes

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1754 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
Christine Caulfield 2009-01-30 13:31:40 +00:00
parent 6bc8ceda24
commit 9a438085e2
3 changed files with 35 additions and 0 deletions

View File

@ -70,6 +70,14 @@ cs_error_t quorum_finalize (
quorum_handle_t handle);
/*
* Get a file descriptor on which to poll. quorum_handle_t is NOT a
* file descriptor and may not be used directly.
*/
cs_error_t quorum_fd_get (
quorum_handle_t handle,
int *fd);
/*
* Dispatch messages and configuration changes
*/

View File

@ -110,6 +110,13 @@ cs_error_t votequorum_dispatch (
votequorum_handle_t handle,
cs_dispatch_flags_t dispatch_types);
/*
* Get a file descriptor on which to poll. votequorum_handle_t is NOT a
* file descriptor and may not be used directly.
*/
cs_error_t votequorum_fd_get (
votequorum_handle_t handle,
int *fd);
/*
* Get quorum information.

View File

@ -670,6 +670,26 @@ cs_error_t votequorum_context_set (
}
cs_error_t votequorum_fd_get (
votequorum_handle_t handle,
int *fd)
{
cs_error_t error;
struct votequorum_inst *votequorum_inst;
error = saHandleInstanceGet (&votequorum_handle_t_db, handle, (void *)&votequorum_inst);
if (error != CS_OK) {
return (error);
}
*fd = votequorum_inst->dispatch_fd;
(void)saHandleInstancePut (&votequorum_handle_t_db, handle);
return (CS_OK);
}
struct res_overlay {
mar_res_header_t header __attribute__((aligned(8)));
char data[512000];