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