X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Frotate.h;h=6dc3b7aa189768f9c47787f12e03ae031d0585ee;hp=ea2383f2c9415cc14286587bc74804da5f8f1c89;hb=90936dcf0968343f20b2f6fd365b9c015cdb9717;hpb=d88744a44aa5f2ca90ab87946692b9eed3120641 diff --git a/src/bin/lttng-sessiond/rotate.h b/src/bin/lttng-sessiond/rotate.h index ea2383f2c..6dc3b7aa1 100644 --- a/src/bin/lttng-sessiond/rotate.h +++ b/src/bin/lttng-sessiond/rotate.h @@ -18,6 +18,7 @@ #ifndef ROTATE_H #define ROTATE_H +#include #include "rotation-thread.h" /* @@ -41,7 +42,9 @@ struct rotation_channel_info { struct cds_lfht_node rotate_channels_ht_node; }; + extern struct cds_lfht *channel_pending_rotate_ht; +extern struct lttng_notification_channel *rotate_notification_channel; unsigned long hash_channel_key(struct rotation_channel_key *key); @@ -60,4 +63,14 @@ int relay_rotate_pending(struct ltt_session *session, uint64_t chunk_id); int rotate_add_channel_pending(uint64_t key, enum lttng_domain_type domain, struct ltt_session *session); +/* + * Subscribe/unsubscribe the notification_channel from the rotation_thread to + * session usage notifications to perform size-based rotations. + */ +int subscribe_session_consumed_size_rotation(struct ltt_session *session, + uint64_t size, + struct notification_thread_handle *notification_thread_handle); +int unsubscribe_session_consumed_size_rotation(struct ltt_session *session, + struct notification_thread_handle *notification_thread_handle); + #endif /* ROTATE_H */