|
MobilityDB 1.3
|
◆ meos_error_handler_t
Process-global error handler function. Reads and writes use the GCC/Clang __atomic_* builtins so that multiple threads calling meos_initialize() (which transitively calls meos_initialize_error_handler) do not race on the same word. Reads in meos_error() use __ATOMIC_ACQUIRE; writes in meos_initialize_error_handler() use __ATOMIC_RELEASE. The value installed is identical across threads in normal usage (default_error_handler), so this is a benign-race fix that lets existing call patterns continue working unchanged. Builtins are used in preference to <stdatomic.h> Atomic + atomic* functions because the latter triggers spurious cppcheck-missingIncludeSystem alerts on Codacy's wrapper, which doesn't see the project's compile_commands.json. |