Implement tracepoint-internal.h as LGPLv2.1 (not exported)
[lttng-ust.git] / liblttng-ust / tracepoint-internal.h
1 #ifndef _LTTNG_TRACEPOINT_INTERNAL_H
2 #define _LTTNG_TRACEPOINT_INTERNAL_H
3
4 /*
5 * Copyright (c) 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation;
10 * version 2.1 of the License.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22 #include <urcu/list.h>
23 #include <lttng/tracepoint-types.h>
24
25 struct tracepoint_lib {
26 struct cds_list_head list;
27 struct tracepoint tracepoints_start;
28 int tracepoints_count;
29 };
30
31 struct tracepoint_iter {
32 struct tracepoint_lib *lib;
33 struct tracepoint * const *tracepoint;
34
35 extern int tracepoint_probe_register_noupdate(const char *name, void *callback, void *priv);
36 extern int tracepoint_probe_unregister_noupdate(const char *name, void *callback, void *priv);
37 extern int tracepoint_probe_update_all(void);
38
39 extern void tracepoint_iter_start(struct tracepoint_iter *iter);
40 extern void tracepoint_iter_next(struct tracepoint_iter *iter);
41 extern void tracepoint_iter_stop(struct tracepoint_iter *iter);
42 extern void tracepoint_iter_reset(struct tracepoint_iter *iter);
43 extern int tracepoint_get_iter_range(struct tracepoint * const **tracepoint,
44 struct tracepoint * const *begin, struct tracepoint * const *end);
45
46 /*
47 * call after disconnection of last probe implemented within a
48 * shared object before unmapping the library that contains the probe.
49 */
50 static inline void tracepoint_synchronize_unregister(void)
51 {
52 synchronize_rcu();
53 }
54
55 extern void init_tracepoint(void);
56 extern void exit_tracepoint(void);
57
58 #endif /* _LTTNG_TRACEPOINT_INTERNAL_H */
This page took 0.040266 seconds and 5 git commands to generate.