Commit | Line | Data |
---|---|---|
d086f507 | 1 | /* |
ab5be9fa MJ |
2 | * Copyright (C) 2017 Julien Desfossez <jdesfossez@efficios.com> |
3 | * Copyright (C) 2018 Jérémie Galarneau <jeremie.galarneau@efficios.com> | |
d086f507 | 4 | * |
ab5be9fa | 5 | * SPDX-License-Identifier: GPL-2.0-only |
d086f507 | 6 | * |
d086f507 JD |
7 | */ |
8 | ||
9 | #ifndef SESSIOND_TIMER_H | |
10 | #define SESSIOND_TIMER_H | |
11 | ||
0038180d JG |
12 | #include "rotation-thread.hpp" |
13 | #include "session.hpp" | |
14 | ||
d086f507 | 15 | #include <pthread.h> |
bc26e826 | 16 | #include <stdbool.h> |
d086f507 | 17 | |
d086f507 | 18 | struct timer_thread_parameters { |
0038180d | 19 | lttng::sessiond::rotation_thread_timer_queue *rotation_thread_job_queue; |
d086f507 JD |
20 | }; |
21 | ||
0f4aa1a8 | 22 | int timer_signal_init(); |
d086f507 | 23 | |
92816cc3 JG |
24 | /* Start a session's rotation pending check timer (one-shot mode). */ |
25 | int timer_session_rotation_pending_check_start(struct ltt_session *session, | |
28f23191 | 26 | unsigned int interval_us); |
92816cc3 | 27 | /* Stop a session's rotation pending check timer. */ |
28f23191 | 28 | int timer_session_rotation_pending_check_stop(ltt_session& session); |
259c2674 | 29 | |
92816cc3 JG |
30 | /* Start a session's rotation schedule timer. */ |
31 | int timer_session_rotation_schedule_timer_start(struct ltt_session *session, | |
28f23191 | 32 | unsigned int interval_us); |
92816cc3 JG |
33 | /* Stop a session's rotation schedule timer. */ |
34 | int timer_session_rotation_schedule_timer_stop(struct ltt_session *session); | |
d88744a4 | 35 | |
28f23191 | 36 | bool launch_timer_thread(struct timer_thread_parameters *timer_thread_parameters); |
bc26e826 | 37 | |
d086f507 | 38 | #endif /* SESSIOND_TIMER_H */ |