2 * Copyright (C) 2017 Julien Desfossez <jdesfossez@efficios.com>
3 * Copyright (C) 2018 Jérémie Galarneau <jeremie.galarneau@efficios.com>
5 * SPDX-License-Identifier: GPL-2.0-only
9 #ifndef SESSIOND_TIMER_H
10 #define SESSIOND_TIMER_H
12 #include "rotation-thread.hpp"
13 #include "session.hpp"
18 struct timer_thread_parameters {
19 lttng::sessiond::rotation_thread_timer_queue *rotation_thread_job_queue;
22 int timer_signal_init();
24 /* Start a session's rotation pending check timer (one-shot mode). */
25 int timer_session_rotation_pending_check_start(struct ltt_session *session,
26 unsigned int interval_us);
27 /* Stop a session's rotation pending check timer. */
28 int timer_session_rotation_pending_check_stop(ltt_session& session);
30 /* Start a session's rotation schedule timer. */
31 int timer_session_rotation_schedule_timer_start(struct ltt_session *session,
32 unsigned int interval_us);
33 /* Stop a session's rotation schedule timer. */
34 int timer_session_rotation_schedule_timer_stop(struct ltt_session *session);
36 bool launch_timer_thread(struct timer_thread_parameters *timer_thread_parameters);
38 #endif /* SESSIOND_TIMER_H */