Commit | Line | Data |
---|---|---|
1ea11eab MD |
1 | #ifndef _LTTNG_TRACER_H |
2 | #define _LTTNG_TRACER_H | |
3 | ||
4 | /* | |
5 | * Copyright (C) 2005-2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | |
6 | * | |
7 | * This contains the core definitions for the Linux Trace Toolkit. | |
8 | * | |
b728d87e MD |
9 | * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED |
10 | * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. | |
1ea11eab | 11 | * |
b728d87e MD |
12 | * Permission is hereby granted to use or copy this program |
13 | * for any purpose, provided the above notices are retained on all copies. | |
14 | * Permission to modify the code and to distribute modified code is granted, | |
15 | * provided the above notices are retained, and a notice that the code was | |
16 | * modified is included with the above copyright notice. | |
1ea11eab MD |
17 | */ |
18 | ||
4318ae1b | 19 | #include <lttng/config.h> |
b728d87e | 20 | #include <lttng/ust-version.h> |
d4d59a97 MD |
21 | |
22 | #ifndef HAVE_EFFICIENT_UNALIGNED_ACCESS | |
1ea11eab MD |
23 | /* Align data on its natural alignment */ |
24 | #define RING_BUFFER_ALIGN | |
25 | #endif | |
26 | ||
1ea11eab MD |
27 | #ifndef CHAR_BIT |
28 | #define CHAR_BIT 8 | |
29 | #endif | |
30 | ||
31 | #ifdef RING_BUFFER_ALIGN | |
32 | #define lttng_alignof(type) __alignof__(type) | |
33 | #else | |
34 | #define lttng_alignof(type) 1 | |
35 | #endif | |
36 | ||
37 | #define lttng_is_signed_type(type) (((type)(-1)) < 0) | |
38 | ||
39 | #endif /* _LTTNG_TRACER_CORE_H */ |