1CMAP_INC(3) Corosync Cluster Engine Programmer's Manual CMAP_INC(3)
2
3
4
6 cmap_inc - Increase already stored value in CMAP
7
8
10 #include <corosync/cmap.h>
11
12
13 cs_error_t cmap_inc (cmap_handle_t handle, const char *key_name);
14
15
17 The cmap_inc function is used to increase integer value of already
18 stored key inside cmap. The handle argument is connection to CMAP data‐
19 base obtained by calling cmap_initialize(3) function. key_name is name
20 of key to increase value of.
21
22 Function is defined only on values where increase makes sense and is
23 well defined, so it can be one of:
24
25 CMAP_VALUETYPE_INT8 - 8-bit signed integer
26
27 CMAP_VALUETYPE_UINT8 - 8-bit unsigned integer
28
29 CMAP_VALUETYPE_INT16 - 16-bit signed integer
30
31 CMAP_VALUETYPE_UINT16 - 16-bit unsigned integer
32
33 CMAP_VALUETYPE_INT32 - 32-bit signed integer
34
35 CMAP_VALUETYPE_UINT32 - 32-bit unsigned integer
36
37 CMAP_VALUETYPE_INT64 - 64-bit signed integer
38
39 CMAP_VALUETYPE_UINT64 - 64-bit unsigned integer
40
41 Overflow/underflow is not detected and it's ignored.
42
43
45 This call returns the CS_OK value if successful. If value or key_name
46 are unspecified, CS_ERR_INVALID_PARAM is returned. CS_ERR_NOT_EXIST
47 error is returned if key doesn't exist (wasn't created by calling
48 cmap_set(3) first). Some of keys may be tagged read-only directly in
49 corosync and setting such key will result in CS_ERR_ACCESS error.
50
51
53 cmap_get(3), cmap_set(3), cmap_initialize(3), cmap_overview(8)
54
55 CS_ERR_TRY_AGAIN Resource temporarily unavailable
56
57 CS_ERR_INVALID_PARAM Invalid argument
58
59 CS_ERR_ACCESS Permission denied
60
61 CS_ERR_LIBRARY The connection failed
62
63 CS_ERR_INTERRUPT System call interrupted by a signal
64
65 CS_ERR_NOT_SUPPORTED The requested protocol/functionality not supported
66
67 CS_ERR_MESSAGE_ERROR Incorrect auth message received
68
69 CS_ERR_NO_MEMORY Not enough memory to complete the requested task
70
71
72
73corosync Man Page 03/02/2012 CMAP_INC(3)