configure: regroup C header checks
[lttng-ust.git] / liblttng-ust / lttng-tracer-core.h
... / ...
CommitLineData
1/*
2 * SPDX-License-Identifier: LGPL-2.1-only
3 *
4 * Copyright (C) 2005-2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 *
6 * This contains the core definitions for the Linux Trace Toolkit.
7 */
8
9#ifndef _LTTNG_TRACER_CORE_H
10#define _LTTNG_TRACER_CORE_H
11
12#include <stddef.h>
13#include <urcu/arch.h>
14#include <urcu/list.h>
15#include <lttng/ust-tracer.h>
16#include <lttng/ringbuffer-context.h>
17#include <usterr-signal-safe.h>
18
19/*
20 * The longuest possible namespace proc path is with the cgroup ns
21 * and the maximum theoretical linux pid of 536870912 :
22 *
23 * /proc/self/task/536870912/ns/cgroup
24 */
25#define LTTNG_PROC_NS_PATH_MAX 40
26
27struct lttng_ust_session;
28struct lttng_ust_channel_buffer;
29struct lttng_ust_ctx_field;
30struct lttng_ust_lib_ring_buffer_ctx;
31struct lttng_ust_ctx_value;
32struct lttng_ust_event_recorder;
33struct lttng_ust_event_notifier;
34struct lttng_ust_notification_ctx;
35
36__attribute__((visibility("hidden")))
37int ust_lock(void) __attribute__ ((warn_unused_result));
38
39__attribute__((visibility("hidden")))
40void ust_lock_nocheck(void);
41
42__attribute__((visibility("hidden")))
43void ust_unlock(void);
44
45__attribute__((visibility("hidden")))
46void lttng_ust_fixup_tls(void);
47
48__attribute__((visibility("hidden")))
49void lttng_fixup_event_tls(void);
50
51__attribute__((visibility("hidden")))
52void lttng_fixup_vtid_tls(void);
53
54__attribute__((visibility("hidden")))
55void lttng_fixup_procname_tls(void);
56
57__attribute__((visibility("hidden")))
58void lttng_fixup_cgroup_ns_tls(void);
59
60__attribute__((visibility("hidden")))
61void lttng_fixup_ipc_ns_tls(void);
62
63__attribute__((visibility("hidden")))
64void lttng_fixup_net_ns_tls(void);
65
66__attribute__((visibility("hidden")))
67void lttng_fixup_time_ns_tls(void);
68
69__attribute__((visibility("hidden")))
70void lttng_fixup_uts_ns_tls(void);
71
72__attribute__((visibility("hidden")))
73void lttng_ust_fixup_fd_tracker_tls(void);
74
75__attribute__((visibility("hidden")))
76const char *lttng_ust_obj_get_name(int id);
77
78__attribute__((visibility("hidden")))
79int lttng_get_notify_socket(void *owner);
80
81__attribute__((visibility("hidden")))
82char* lttng_ust_sockinfo_get_procname(void *owner);
83
84__attribute__((visibility("hidden")))
85void lttng_ust_sockinfo_session_enabled(void *owner);
86
87__attribute__((visibility("hidden")))
88ssize_t lttng_ust_read(int fd, void *buf, size_t len);
89
90__attribute__((visibility("hidden")))
91size_t lttng_ust_dummy_get_size(struct lttng_ust_ctx_field *field, size_t offset);
92
93__attribute__((visibility("hidden")))
94void lttng_ust_dummy_record(struct lttng_ust_ctx_field *field,
95 struct lttng_ust_lib_ring_buffer_ctx *ctx,
96 struct lttng_ust_channel_buffer *chan);
97__attribute__((visibility("hidden")))
98void lttng_ust_dummy_get_value(struct lttng_ust_ctx_field *field,
99 struct lttng_ust_ctx_value *value);
100
101__attribute__((visibility("hidden")))
102void lttng_event_notifier_notification_send(
103 struct lttng_ust_event_notifier *event_notifier,
104 const char *stack_data,
105 struct lttng_ust_notification_ctx *notif_ctx);
106
107__attribute__((visibility("hidden")))
108struct lttng_counter_transport *lttng_counter_transport_find(const char *name);
109
110__attribute__((visibility("hidden")))
111void lttng_counter_transport_register(struct lttng_counter_transport *transport);
112
113__attribute__((visibility("hidden")))
114void lttng_counter_transport_unregister(struct lttng_counter_transport *transport);
115
116#ifdef HAVE_LINUX_PERF_EVENT_H
117__attribute__((visibility("hidden")))
118void lttng_ust_fixup_perf_counter_tls(void);
119
120__attribute__((visibility("hidden")))
121void lttng_perf_lock(void);
122
123__attribute__((visibility("hidden")))
124void lttng_perf_unlock(void);
125#else /* #ifdef HAVE_LINUX_PERF_EVENT_H */
126static inline
127void lttng_ust_fixup_perf_counter_tls(void)
128{
129}
130static inline
131void lttng_perf_lock(void)
132{
133}
134static inline
135void lttng_perf_unlock(void)
136{
137}
138#endif /* #else #ifdef HAVE_LINUX_PERF_EVENT_H */
139
140#endif /* _LTTNG_TRACER_CORE_H */
This page took 0.023658 seconds and 4 git commands to generate.