corosync  2.3.5-dirty
Data Structures | Macros | Typedefs | Functions
include/corosync/quorum.h File Reference
#include <corosync/corotypes.h>
Include dependency graph for include/corosync/quorum.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  quorum_callbacks_t
 

Macros

#define QUORUM_FREE   0
 
#define QUORUM_SET   1
 

Typedefs

typedef uint64_t quorum_handle_t
 
typedef void(* quorum_notification_fn_t) (quorum_handle_t handle, uint32_t quorate, uint64_t ring_seq, uint32_t view_list_entries, uint32_t *view_list)
 

Functions

cs_error_t quorum_initialize (quorum_handle_t *handle, quorum_callbacks_t *callbacks, uint32_t *quorum_type)
 Create a new quorum connection. More...
 
cs_error_t quorum_finalize (quorum_handle_t handle)
 Close the quorum handle. More...
 
cs_error_t quorum_fd_get (quorum_handle_t handle, int *fd)
 Get a file descriptor on which to poll. More...
 
cs_error_t quorum_dispatch (quorum_handle_t handle, cs_dispatch_flags_t dispatch_types)
 Dispatch messages and configuration changes. More...
 
cs_error_t quorum_getquorate (quorum_handle_t handle, int *quorate)
 Get quorum information. More...
 
cs_error_t quorum_trackstart (quorum_handle_t handle, unsigned int flags)
 Track node and quorum changes. More...
 
cs_error_t quorum_trackstop (quorum_handle_t handle)
 
cs_error_t quorum_context_set (quorum_handle_t handle, const void *context)
 
cs_error_t quorum_context_get (quorum_handle_t handle, const void **context)
 

Macro Definition Documentation

#define QUORUM_FREE   0

Definition at line 57 of file include/corosync/quorum.h.

#define QUORUM_SET   1

Definition at line 58 of file include/corosync/quorum.h.

Typedef Documentation

typedef uint64_t quorum_handle_t

Definition at line 43 of file include/corosync/quorum.h.

typedef void(* quorum_notification_fn_t) (quorum_handle_t handle, uint32_t quorate, uint64_t ring_seq, uint32_t view_list_entries, uint32_t *view_list)

Definition at line 45 of file include/corosync/quorum.h.

Function Documentation

cs_error_t quorum_context_get ( quorum_handle_t  handle,
const void **  context 
)

Definition at line 232 of file lib/quorum.c.

References quorum_inst::context, CS_OK, and hdb_error_to_cs().

cs_error_t quorum_context_set ( quorum_handle_t  handle,
const void *  context 
)

Definition at line 251 of file lib/quorum.c.

References quorum_inst::context, CS_OK, and hdb_error_to_cs().

cs_error_t quorum_dispatch ( quorum_handle_t  handle,
cs_dispatch_flags_t  dispatch_types 
)
cs_error_t quorum_fd_get ( quorum_handle_t  handle,
int *  fd 
)

Get a file descriptor on which to poll.

Note
quorum_handle_t is NOT a file descriptor and may not be used directly.

Definition at line 212 of file lib/quorum.c.

References quorum_inst::c, CS_OK, hdb_error_to_cs(), and qb_to_cs_error().

Referenced by sam_initialize().

cs_error_t quorum_finalize ( quorum_handle_t  handle)

Close the quorum handle.

Definition at line 142 of file lib/quorum.c.

References CS_ERR_BAD_HANDLE, CS_OK, quorum_inst::finalize, and hdb_error_to_cs().

Referenced by sam_initialize(), and sam_register().

cs_error_t quorum_getquorate ( quorum_handle_t  handle,
int *  quorate 
)
cs_error_t quorum_initialize ( quorum_handle_t handle,
quorum_callbacks_t callbacks,
uint32_t *  quorum_type 
)
cs_error_t quorum_trackstart ( quorum_handle_t  handle,
unsigned int  flags 
)
cs_error_t quorum_trackstop ( quorum_handle_t  handle)