Fix: sessiond: size-based notification occasionally not triggered
[lttng-tools.git] / src / bin / lttng-sessiond / rotation-thread.hpp
1 /*
2 * Copyright (C) 2017 Julien Desfossez <jdesfossez@efficios.com>
3 * Copyright (C) 2018 Jérémie Galarneau <jeremie.galarneau@efficios.com>
4 *
5 * SPDX-License-Identifier: GPL-2.0-only
6 *
7 */
8
9 #ifndef ROTATION_THREAD_H
10 #define ROTATION_THREAD_H
11
12 #include <urcu/list.h>
13 #include <urcu.h>
14 #include <urcu/rculfhash.h>
15 #include <lttng/domain.h>
16 #include <common/pipe.hpp>
17 #include <common/compat/poll.hpp>
18 #include <common/hashtable/hashtable.hpp>
19 #include <pthread.h>
20 #include <semaphore.h>
21 #include "session.hpp"
22 #include "notification-thread.hpp"
23
24 extern struct lttng_notification_channel *rotate_notification_channel;
25 extern int rotate_notification_channel_subscription_change_eventfd;
26
27 enum rotation_thread_job_type {
28 ROTATION_THREAD_JOB_TYPE_SCHEDULED_ROTATION,
29 ROTATION_THREAD_JOB_TYPE_CHECK_PENDING_ROTATION
30 };
31
32 struct rotation_thread_timer_queue;
33 struct rotation_thread_handle;
34
35 struct rotation_thread_timer_queue *rotation_thread_timer_queue_create(void);
36 void rotation_thread_timer_queue_destroy(
37 struct rotation_thread_timer_queue *queue);
38
39 struct rotation_thread_handle *rotation_thread_handle_create(
40 struct rotation_thread_timer_queue *rotation_timer_queue,
41 struct notification_thread_handle *notification_thread_handle);
42
43 void rotation_thread_handle_destroy(
44 struct rotation_thread_handle *handle);
45
46 void rotation_thread_enqueue_job(struct rotation_thread_timer_queue *queue,
47 enum rotation_thread_job_type job_type,
48 struct ltt_session *session);
49
50 bool launch_rotation_thread(struct rotation_thread_handle *handle);
51
52 #endif /* ROTATION_THREAD_H */
This page took 0.031871 seconds and 5 git commands to generate.