Move headers under include/
[lttng-modules.git] / include / lttng / lttng-cpuhotplug.h
1 /* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
2 *
3 * lttng-cpuhotplug.h
4 *
5 * Copyright (C) 2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 */
7
8 #ifndef LTTNG_CPUHOTPLUG_H
9 #define LTTNG_CPUHOTPLUG_H
10
11 struct lttng_cpuhp_node;
12
13 #include <linux/cpuhotplug.h>
14
15 enum lttng_cpuhp_component {
16 LTTNG_RING_BUFFER_FRONTEND,
17 LTTNG_RING_BUFFER_BACKEND,
18 LTTNG_RING_BUFFER_ITER,
19 LTTNG_CONTEXT_PERF_COUNTERS,
20 };
21
22 struct lttng_cpuhp_node {
23 enum lttng_cpuhp_component component;
24 struct hlist_node node;
25 };
26
27 extern enum cpuhp_state lttng_hp_prepare;
28 extern enum cpuhp_state lttng_hp_online;
29
30 int lttng_cpuhp_rb_backend_prepare(unsigned int cpu,
31 struct lttng_cpuhp_node *node);
32 int lttng_cpuhp_rb_frontend_dead(unsigned int cpu,
33 struct lttng_cpuhp_node *node);
34 int lttng_cpuhp_rb_frontend_online(unsigned int cpu,
35 struct lttng_cpuhp_node *node);
36 int lttng_cpuhp_rb_frontend_offline(unsigned int cpu,
37 struct lttng_cpuhp_node *node);
38 int lttng_cpuhp_rb_iter_online(unsigned int cpu,
39 struct lttng_cpuhp_node *node);
40
41 /* Ring buffer is a separate library. */
42 void lttng_rb_set_hp_prepare(enum cpuhp_state val);
43 void lttng_rb_set_hp_online(enum cpuhp_state val);
44
45 extern enum cpuhp_state lttng_rb_hp_prepare;
46 extern enum cpuhp_state lttng_rb_hp_online;
47
48 #endif /* LTTNG_CPUHOTPLUG_H */
This page took 0.029336 seconds and 4 git commands to generate.