All file and function names should be unique across the entire project, to allow for individual tracing via PCMK_trace_files
and PCMK_trace_functions
, as well as making detail logs easier to follow.
Any exposed symbols in libraries (non-static
function names, type names, etc.) must begin with a prefix appropriate to the library, for example, crm_
, pe_
, st_
, lrm_
. This reduces the chance of naming collisions with software linked against the library.
Time intervals are sometimes represented in Pacemaker code as user-defined text specifications (e.g. "10s"), other times as an integer number of seconds or milliseconds, and still other times as a string representation of an integer number. Variables for these should be named with an indication of which is being used (e.g. interval_spec
, interval_ms
, or interval_ms_s
instead of interval
).