X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fnotification-thread-internal.h;h=e36180fb6af634ef4e23c6f1ad7aba45bb3017d1;hp=5aaac9d23fb6821e9a24634741b7d9760f04b665;hb=6c24d3fd5ade8231445e720c174afe3da4210179;hpb=98b5ff34df5d330fe139907ed77b4327ce9afa48 diff --git a/src/bin/lttng-sessiond/notification-thread-internal.h b/src/bin/lttng-sessiond/notification-thread-internal.h index 5aaac9d23..e36180fb6 100644 --- a/src/bin/lttng-sessiond/notification-thread-internal.h +++ b/src/bin/lttng-sessiond/notification-thread-internal.h @@ -111,7 +111,16 @@ struct notification_client_list { }; struct notification_client { - /* Nests within the notification_client_list lock. */ + /* + * Nests within the notification_client_list lock. + * + * Protects the outbound communication and the active flag which + * is used by both the notification and action executor threads. + * + * The remaining fields of the object can be used without any + * synchronization as they are either immutable (id, creds, version) or + * only accessed by the notification thread. + */ pthread_mutex_t lock; notification_client_id id; int socket; @@ -205,6 +214,7 @@ bool notification_client_list_get(struct notification_client_list *list); LTTNG_HIDDEN 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,