MCPcopy Create free account
hub / github.com/corosync/corosync / quorum_finalize

Function quorum_finalize

lib/quorum.c:209–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207}
208
209cs_error_t quorum_finalize (
210 quorum_handle_t handle)
211{
212 struct quorum_inst *quorum_inst;
213 cs_error_t error;
214
215 error = hdb_error_to_cs(hdb_handle_get (&quorum_handle_t_db, handle, (void *)&quorum_inst));
216 if (error != CS_OK) {
217 return (error);
218 }
219
220 /*
221 * Another thread has already started finalizing
222 */
223 if (quorum_inst->finalize) {
224 (void)hdb_handle_put (&quorum_handle_t_db, handle);
225 return (CS_ERR_BAD_HANDLE);
226 }
227
228 quorum_inst->finalize = 1;
229
230 (void)hdb_handle_destroy (&quorum_handle_t_db, handle);
231
232 (void)hdb_handle_put (&quorum_handle_t_db, handle);
233
234 return (CS_OK);
235}
236
237cs_error_t quorum_getquorate (
238 quorum_handle_t handle,

Callers 5

close_allFunction · 0.85
_cs_quorum_finalizeFunction · 0.85
sam_initializeFunction · 0.85
sam_registerFunction · 0.85
finalizeFunction · 0.85

Calls 4

hdb_error_to_csFunction · 0.85
hdb_handle_getFunction · 0.85
hdb_handle_putFunction · 0.85
hdb_handle_destroyFunction · 0.85

Tested by

no test coverage detected