10 #ifndef CRM_INTERNAL__H
11 # define CRM_INTERNAL__H
18 # include <libxml/tree.h>
25 #define PCMK__NO_COMPAT
36 static inline long long
37 crm_clear_bit(
const char *
function,
int line,
const char *
target,
long long word,
long long bit)
39 long long rc = (word & ~bit);
44 crm_trace(
"Bit 0x%.8llx for %s cleared by %s:%d", bit,
target,
function, line);
46 crm_trace(
"Bit 0x%.8llx cleared by %s:%d", bit,
function, line);
52 static inline long long
53 crm_set_bit(
const char *
function,
int line,
const char *
target,
long long word,
long long bit)
55 long long rc = (word | bit);
60 crm_trace(
"Bit 0x%.8llx for %s set by %s:%d", bit,
target,
function, line);
62 crm_trace(
"Bit 0x%.8llx set by %s:%d", bit,
function, line);
68 # define set_bit(word, bit) word = crm_set_bit(__FUNCTION__, __LINE__, NULL, word, bit)
69 # define clear_bit(word, bit) word = crm_clear_bit(__FUNCTION__, __LINE__, NULL, word, bit)
82 #define PCMK__XA_ATTR_DAMPENING "attr_dampening"
83 #define PCMK__XA_ATTR_FORCE "attrd_is_force_write"
84 #define PCMK__XA_ATTR_INTERVAL "attr_clear_interval"
85 #define PCMK__XA_ATTR_IS_PRIVATE "attr_is_private"
86 #define PCMK__XA_ATTR_IS_REMOTE "attr_is_remote"
87 #define PCMK__XA_ATTR_NAME "attr_name"
88 #define PCMK__XA_ATTR_NODE_ID "attr_host_id"
89 #define PCMK__XA_ATTR_NODE_NAME "attr_host"
90 #define PCMK__XA_ATTR_OPERATION "attr_clear_operation"
91 #define PCMK__XA_ATTR_PATTERN "attr_regex"
92 #define PCMK__XA_ATTR_RESOURCE "attr_resource"
93 #define PCMK__XA_ATTR_SECTION "attr_section"
94 #define PCMK__XA_ATTR_SET "attr_set"
95 #define PCMK__XA_ATTR_USER "attr_user"
96 #define PCMK__XA_ATTR_UUID "attr_key"
97 #define PCMK__XA_ATTR_VALUE "attr_value"
98 #define PCMK__XA_ATTR_VERSION "attr_version"
99 #define PCMK__XA_ATTR_WRITER "attr_writer"
100 #define PCMK__XA_MODE "mode"
101 #define PCMK__XA_TASK "task"
108 # define PCMK__SERVER_BASED_RO "cib_ro"
109 # define PCMK__SERVER_BASED_RW "cib_rw"
110 # define PCMK__SERVER_BASED_SHM "cib_shm"
116 #define PCMK__ATTRD_CMD_PEER_REMOVE "peer-remove"
117 #define PCMK__ATTRD_CMD_UPDATE "update"
118 #define PCMK__ATTRD_CMD_UPDATE_BOTH "update-both"
119 #define PCMK__ATTRD_CMD_UPDATE_DELAY "update-delay"
120 #define PCMK__ATTRD_CMD_QUERY "query"
121 #define PCMK__ATTRD_CMD_REFRESH "refresh"
122 #define PCMK__ATTRD_CMD_FLUSH "flush"
123 #define PCMK__ATTRD_CMD_SYNC "sync"
124 #define PCMK__ATTRD_CMD_SYNC_RESPONSE "sync-response"
125 #define PCMK__ATTRD_CMD_CLEAR_FAILURE "clear-failure"
132 #define PCMK__ENV_PHYSICAL_HOST "physical_host"
135 # if SUPPORT_COROSYNC
136 # include <qb/qbipc_common.h>
137 # include <corosync/corotypes.h>
138 typedef struct qb_ipc_request_header cs_ipc_header_request_t;
139 typedef struct qb_ipc_response_header cs_ipc_header_response_t;
155 realloc_safe(
void *ptr,
size_t size)
162 new_ptr = realloc(ptr,
size);
163 if (new_ptr == NULL) {
171 void crm_xml_dump(xmlNode *
data,
int options,
char **buffer,
int *offset,
int *max,
int depth);
174 #if defined(PCMK__WITH_ATTRIBUTE_OUTPUT_ARGS)
175 # define PCMK__OUTPUT_ARGS(ARGS...) __attribute__((output_args(ARGS)))
177 # define PCMK__OUTPUT_ARGS(ARGS...)
enum crm_proc_flag __attribute__
void crm_buffer_add_char(char **buffer, int *offset, int *max, char c)
pid_t pcmk_locate_sbd(void)
void strip_text_nodes(xmlNode *xml)
void crm_make_daemon(const char *name, gboolean daemonize, const char *pidfile)
void pcmk_panic(const char *origin)
char * generate_hash_key(const char *crm_msg_reference, const char *sys)
void crm_xml_dump(xmlNode *data, int options, char **buffer, int *offset, int *max, int depth)
const char * crm_xml_add_last_written(xmlNode *xml_node)
Wrappers for and extensions to libqb logging.
#define crm_trace(fmt, args...)
int id __attribute__((aligned(8)))
int error __attribute__((aligned(8)))
int size __attribute__((aligned(8)))