1CPG_DISPATCH(3) Openais Programmer's Manual CPG_DISPATCH(3)
2
3
4
6 cpg_dispatch - Dispatches callbacks from the CPG service
7
9 #include <openais/cpg.h>
10
11 int cpg_dispatch(cpg_handle_t handle, cpg_dispatch_t *dispatch_types);
12
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 CPG_DISPATCH_ONE,
27 CPG_DISPATCH_ALL,
28 CPG_DISPATCH_BLOCKING
29 } cpg_dispatch_t;
30
31 The dispatch values have the following meanings:
32
33 CPG_DISPATCH_ONE
34 Dispatch atleast one callback, blocking until the callback is
35 dispatched.
36
37 CPG_DISPATCH_ALL
38 Dispatch all waiting callbacks without blocking to wait for any
39 callbacks.
40
41 CPG_DISPATCH_BLOCKING
42 Dispatch all callbacks blocking indefinately. This is used in a
43 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
49 This call returns the CPG_OK value if successful, otherwise an error is
50 returned.
51
53 The errors are undocumented.
54
56 cpg_overview(8), cpg_initialize(3), cpg_finalize(3), cpg_fd_get(3),
57 cpg_join(3), cpg_leave(3), cpg_mcast_joined(3), cpg_membership_get(3)
58
59openais Man Page 2004-08-31 CPG_DISPATCH(3)