bt_ctf_stream_get_discarded_events_count(): return int
[babeltrace.git] / std-ext-lib.txt
CommitLineData
6dc2ca62
MD
1Common Trace Format - Standards, Extensions and Libraries
2Mathieu Desnoyers
3September 26, 2010
4
5This document describes the CTF library dependencies on standards, extensions
6and libraries.
7
8
9** Standards
10
11* C99
12
13This library is C99 compliant. A non-documented non-compliance should be
14reported as a bug. See the ISO/IEC 9899:TC2 publication:
15
16 http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf
17
18
19* IEEE 754-2008
20
21The IEEE 754-2008 standard is used for binary floating point arithmetic
22representation. See:
23
24 http://grouper.ieee.org/groups/754/
25
26
27* GNU/C extensions
28
29This library uses some widely GNU/C extensions widely adopted by compilers.
30For detail, see:
31
32 http://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html#C-Extensions
33
34
35
36** Non-standard Dependencies
37
38In some cases, standards do not provide the required primitives to write
39portable code; these are listed here.
40
41
42* Non-standard endian.h
43
44endian.h is used to provide the following definitions:
45
46#define LITTLE_ENDIAN 1234
47#define BIG_ENDIAN 4321
48#define BYTE_ORDER /* Your architecture: BIG_ENDIAN or LITTLE_ENDIAN */
49
50
51* Bitfields
52
53The ISO/IEC 9899 standard leaves bitfields implementation defined, which is
54unacceptable for portability of this library. Section 6.7.2.1 - "Structure and
55union specifiers", Semantic 10 specifically indicates that padding and order of
56bit-fields allocation within a unit is implementation-defined.
57
58This is why this library provides the bitfield.h header (under the MIT license),
59which specifies bitfields write primitives that uses the same field order as the
60GNU/C compiler, but does not require any padding for fields spreading across
61units. This is therefore a superset of the GNU/C bitfields, which can be dealt
62with by detecting C structure padding manually given the bit offset and
63bit-field size as well as the unit size.
64
65
66** Libraries
67
68* The GLib library of C routines
69
70The library glib 2 is used for its basic data structures. See
71
72 http://library.gnome.org/devel/glib/2.24/glib-data-types.html
This page took 0.040578 seconds and 4 git commands to generate.