Add a basic .clang-tidy file and fix typedef warnings
[lttng-tools.git] / src / bin / lttng-sessiond / notification-thread-internal.hpp
index 497484ba04534586263072b4f629c62bb2b124b8..f711727c32342606b0d8b067e6911f87d7a5984f 100644 (file)
@@ -28,8 +28,21 @@ struct channel_key {
        enum lttng_domain_type domain;
 };
 
+struct session_state_sample {
+       uint64_t consumed_data_size;
+       struct {
+               /* Whether a rotation is ongoing for this session. */
+               bool ongoing;
+               /* Identifier of the currently ongoing rotation. */
+               uint64_t id;
+               /* Location of last completed rotation. */
+               struct lttng_trace_archive_location *location;
+       } rotation;
+};
+
 struct session_info {
        struct lttng_ref ref;
+       uint64_t id;
        char *name;
        uid_t uid;
        gid_t gid;
@@ -47,13 +60,8 @@ struct session_info {
         * destruction.
         */
        struct cds_lfht *sessions_ht;
-       uint64_t consumed_data_size;
-       struct {
-               /* Whether a rotation is ongoing for this session. */
-               bool ongoing;
-               /* Identifier of the currently ongoing rotation. */
-               uint64_t id;
-       } rotation;
+       /* Session's state as of the latest update. */
+       struct session_state_sample last_state_sample;
        /* call_rcu delayed reclaim. */
        struct rcu_head rcu_node;
 };
@@ -165,6 +173,7 @@ struct notification_client {
                 * clean-up.
                 */
                bool active;
+               int current_poll_events;
                struct {
                        /*
                         * During the reception of a message, the reception
@@ -230,10 +239,9 @@ bool notification_client_list_get(struct notification_client_list *list);
 void notification_client_list_put(struct notification_client_list *list);
 
 /* Only returns a non-zero value if a fatal error occurred. */
-typedef int (*report_client_transmission_result_cb)(
-               struct notification_client *client,
-               enum client_transmission_status status,
-               void *user_data);
+using report_client_transmission_result_cb = int (*)(struct notification_client *,
+                                                    enum client_transmission_status,
+                                                    void *);
 
 int notification_client_list_send_evaluation(
                struct notification_client_list *list,
This page took 0.023283 seconds and 4 git commands to generate.