1CPG_DISPATCH(3)   Corosync Cluster Engine Programmer's Manual  CPG_DISPATCH(3)
2
3
4

NAME

6       cpg_dispatch - Dispatches callbacks from the CPG service
7

SYNOPSIS

9       #include <corosync/cpg.h>
10
11       int cpg_dispatch(cpg_handle_t handle, cpg_dispatch_t *dispatch_types);
12

DESCRIPTION

14       The  cpg_dispatch function is used to dispatch configuration changes or
15       messages from the closed process groups API.
16
17       Each application may have several connections to  the  CPG  API.   Each
18       application  uses  the handle argument to uniquely identify the connec‐
19       tion.
20
21       The dispatch_types argument is used to identify the type of dispatch to
22       execute.  The possible types are defined by the structure:
23
24
25              typedef enum {
26                      CS_DISPATCH_ONE,
27                      CS_DISPATCH_ALL,
28                      CS_DISPATCH_BLOCKING
29              } cpg_dispatch_t;
30
31       The dispatch values have the following meanings:
32
33       CS_DISPATCH_ONE
34              Dispatch  atleast  one  callback, blocking until the callback is
35              dispatched.
36
37       CS_DISPATCH_ALL
38              Dispatch all waiting callbacks without blocking to wait for  any
39              callbacks.
40
41       CS_DISPATCH_BLOCKING
42              Dispatch  all callbacks, blocking indefinitely.  This is used in
43              a threaded program where a thread is created, and then  cpg_dis‐
44              patch() is called immediately from the created thread to execute
45              callbacks.
46
47       CS_DISPATCH_ONE_NONBLOCKING
48              Dispatch at most one callback. If there is no pending  callback,
49              CS_ERR_TRY_AGAIN is returned.
50
51

RETURN VALUE

53       This  call returns the CS_OK value if successful, otherwise an error is
54       returned.
55

ERRORS

57       The errors are undocumented.
58

SEE ALSO

60       cpg_overview(8),  cpg_initialize(3),  cpg_finalize(3),   cpg_fd_get(3),
61       cpg_dispatch(3),    cpg_join(3),   cpg_leave(3),   cpg_mcast_joined(3),
62       cpg_membership_get(3)         cpg_zcb_alloc(3)          cpg_zcb_free(3)
63       cpg_zcb_mcast_joined(3)      cpg_context_get(3)      cpg_context_set(3)
64       cpg_local_get(3)
65
66       CS_ERR_TRY_AGAIN Resource temporarily unavailable
67
68       CS_ERR_INVALID_PARAM Invalid argument
69
70       CS_ERR_ACCESS Permission denied
71
72       CS_ERR_LIBRARY The connection failed
73
74       CS_ERR_INTERRUPT System call interrupted by a signal
75
76       CS_ERR_NOT_SUPPORTED The requested protocol/functionality not supported
77
78       CS_ERR_MESSAGE_ERROR Incorrect auth message received
79
80       CS_ERR_NO_MEMORY Not enough memory to complete the requested task
81
82
83
84corosync Man Page                 2004-08-31                   CPG_DISPATCH(3)
Impressum