1BSON_CROSS_PLATFORM_NOTES(3) libbson BSON_CROSS_PLATFORM_NOTES(3)
2
3
4
6 bson_cross_platform_notes - Cross Platform Notes
7
9 The BSON specification dictates that the encoding format is in lit‐
10 tle-endian. Many implementations simply ignore endianness altogether
11 and expect that they are to be run on little-endian. Libbson supports
12 both Big and Little Endian systems. This means we use memcpy() when
13 appropriate instead of dereferencing and properly convert to and from
14 the host endian format. We expect the compiler intrinsics to optimize
15 it to a dereference when possible.
16
18 Libbson's data structures are NOT thread-safe. You are responsible for
19 accessing and mutating these structures from one thread at a time.
20
21 Libbson requires POSIX threads (pthreads) on all UNIX-like platforms.
22 On Windows, the native threading interface is used. Libbson uses your
23 system's threading library to safely generate unique ObjectIds, and to
24 provide a fallback implementation for atomic operations on platforms
25 without built-in atomics.
26
28 MongoDB, Inc
29
31 2017-present, MongoDB, Inc
32
33
34
35
361.17.4 Feb 04, 2021 BSON_CROSS_PLATFORM_NOTES(3)