Acquire a reference to a session when a timer is active
[lttng-tools.git] / src / bin / lttng-sessiond / rotation-thread.h
CommitLineData
db66e574
JD
1/*
2 * Copyright (C) 2017 - Julien Desfossez <jdesfossez@efficios.com>
92816cc3 3 * Copyright (C) 2018 - Jérémie Galarneau <jeremie.galarneau@efficios.com>
db66e574
JD
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License, version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc., 51
16 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18
19#ifndef ROTATION_THREAD_H
20#define ROTATION_THREAD_H
21
22#include <urcu/list.h>
23#include <urcu.h>
24#include <urcu/rculfhash.h>
25#include <lttng/domain.h>
26#include <common/pipe.h>
27#include <common/compat/poll.h>
28#include <common/hashtable/hashtable.h>
29#include <pthread.h>
90936dcf 30#include <semaphore.h>
db66e574 31#include "session.h"
92816cc3 32#include "notification-thread.h"
db66e574 33
92816cc3 34extern struct lttng_notification_channel *rotate_notification_channel;
90936dcf 35
92816cc3
JG
36enum rotation_thread_job_type {
37 ROTATION_THREAD_JOB_TYPE_SCHEDULED_ROTATION,
38 ROTATION_THREAD_JOB_TYPE_CHECK_PENDING_ROTATION
39};
90936dcf 40
92816cc3
JG
41struct rotation_thread_timer_queue;
42struct rotation_thread_handle;
90936dcf 43
92816cc3
JG
44struct rotation_thread_timer_queue *rotation_thread_timer_queue_create(void);
45void rotation_thread_timer_queue_destroy(
46 struct rotation_thread_timer_queue *queue);
db66e574
JD
47
48struct rotation_thread_handle *rotation_thread_handle_create(
90936dcf
JD
49 struct rotation_thread_timer_queue *rotation_timer_queue,
50 struct notification_thread_handle *notification_thread_handle,
51 sem_t *notification_thread_ready);
db66e574
JD
52
53void rotation_thread_handle_destroy(
54 struct rotation_thread_handle *handle);
55
92816cc3 56void rotation_thread_enqueue_job(struct rotation_thread_timer_queue *queue,
c7031a2c
JG
57 enum rotation_thread_job_type job_type,
58 struct ltt_session *session);
92816cc3 59
db66e574
JD
60void *thread_rotation(void *data);
61
62#endif /* ROTATION_THREAD_H */
This page took 0.03079 seconds and 5 git commands to generate.