sessiond: Implement UST event notifier error counter
[lttng-tools.git] / src / bin / lttng-sessiond / event-notifier-error-accounting.h
index 1dea73948337feb6b19a6eb6ea8ae3558e19df86..889efffa3c3316d1619b14380540f0a3d824e243 100644 (file)
@@ -9,14 +9,18 @@
 #define _EVENT_NOTIFIER_ERROR_ACCOUNTING_H
 
 #include <stdint.h>
 #define _EVENT_NOTIFIER_ERROR_ACCOUNTING_H
 
 #include <stdint.h>
+
 #include <lttng/trigger/trigger.h>
 
 #include <lttng/trigger/trigger.h>
 
+#include "ust-app.h"
+
 enum event_notifier_error_accounting_status {
        EVENT_NOTIFIER_ERROR_ACCOUNTING_STATUS_OK,
        EVENT_NOTIFIER_ERROR_ACCOUNTING_STATUS_ERR,
        EVENT_NOTIFIER_ERROR_ACCOUNTING_STATUS_NOT_FOUND,
        EVENT_NOTIFIER_ERROR_ACCOUNTING_STATUS_NOMEM,
        EVENT_NOTIFIER_ERROR_ACCOUNTING_STATUS_NO_INDEX_AVAILABLE,
 enum event_notifier_error_accounting_status {
        EVENT_NOTIFIER_ERROR_ACCOUNTING_STATUS_OK,
        EVENT_NOTIFIER_ERROR_ACCOUNTING_STATUS_ERR,
        EVENT_NOTIFIER_ERROR_ACCOUNTING_STATUS_NOT_FOUND,
        EVENT_NOTIFIER_ERROR_ACCOUNTING_STATUS_NOMEM,
        EVENT_NOTIFIER_ERROR_ACCOUNTING_STATUS_NO_INDEX_AVAILABLE,
+       EVENT_NOTIFIER_ERROR_ACCOUNTING_STATUS_APP_DEAD,
 };
 
 enum event_notifier_error_accounting_status
 };
 
 enum event_notifier_error_accounting_status
@@ -26,6 +30,28 @@ enum event_notifier_error_accounting_status
 event_notifier_error_accounting_register_kernel(
                int kernel_event_notifier_group_fd);
 
 event_notifier_error_accounting_register_kernel(
                int kernel_event_notifier_group_fd);
 
+#ifdef HAVE_LIBLTTNG_UST_CTL
+enum event_notifier_error_accounting_status
+event_notifier_error_accounting_register_app(struct ust_app *app);
+
+enum event_notifier_error_accounting_status
+event_notifier_error_accounting_unregister_app(struct ust_app *app);
+#else /* HAVE_LIBLTTNG_UST_CTL */
+static inline
+enum event_notifier_error_accounting_status
+event_notifier_error_accounting_register_app(struct ust_app *app)
+{
+       return EVENT_NOTIFIER_ERROR_ACCOUNTING_STATUS_OK;
+}
+
+static inline
+enum event_notifier_error_accounting_status
+event_notifier_error_accounting_unregister_app(struct ust_app *app)
+{
+       return EVENT_NOTIFIER_ERROR_ACCOUNTING_STATUS_OK;
+}
+#endif /* HAVE_LIBLTTNG_UST_CTL */
+
 enum event_notifier_error_accounting_status
 event_notifier_error_accounting_register_event_notifier(
                const struct lttng_trigger *trigger,
 enum event_notifier_error_accounting_status
 event_notifier_error_accounting_register_event_notifier(
                const struct lttng_trigger *trigger,
This page took 0.022908 seconds and 4 git commands to generate.