+#ifdef LTTNG_UST_ABORT_ON_CRITICAL
+static inline
+bool lttng_ust_logging_abort_on_critical_enabled(void)
+{
+ return true;
+}
+#else /* #ifdef LTTNG_UST_ABORT_ON_CRITICAL */
+static inline
+bool lttng_ust_logging_abort_on_critical_enabled(void)
+{
+ int current_log_critical_action;
+
+ current_log_critical_action = CMM_LOAD_SHARED(lttng_ust_log_critical_action);
+
+ /* If the global log critical action is unknown, lazy-initialize it. */
+ if (caa_unlikely(current_log_critical_action == LTTNG_UST_LOG_CRITICAL_ACTION_UNKNOWN)) {
+ lttng_ust_logging_init();
+ current_log_critical_action = CMM_LOAD_SHARED(lttng_ust_log_critical_action);
+ }
+
+ return current_log_critical_action == LTTNG_UST_LOG_CRITICAL_ACTION_ABORT;
+}
+#endif /* #ifdef LTTNG_UST_ABORT_ON_CRITICAL */
+