#include <stdlib.h>
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include <boost/predef/other/endian.h>
Go to the source code of this file.
|
#define | MSGPACK_DLLEXPORT |
|
#define | _msgpack_sync_decr_and_fetch(ptr) __sync_sub_and_fetch(ptr, 1) |
|
#define | _msgpack_sync_incr_and_fetch(ptr) __sync_add_and_fetch(ptr, 1) |
|
#define | MSGPACK_ENDIAN_LITTLE_BYTE BOOST_ENDIAN_LITTLE_BYTE |
|
#define | MSGPACK_ENDIAN_BIG_BYTE BOOST_ENDIAN_BIG_BYTE |
|
#define | _msgpack_load16(cast, from, to) |
|
#define | _msgpack_load32(cast, from, to) |
|
#define | _msgpack_load64(cast, from, to) |
|
#define | _msgpack_store16(to, num) do { uint16_t val = _msgpack_be16(num); memcpy(to, &val, 2); } while(0) |
|
#define | _msgpack_store32(to, num) do { uint32_t val = _msgpack_be32(num); memcpy(to, &val, 4); } while(0) |
|
#define | _msgpack_store64(to, num) do { uint64_t val = _msgpack_be64(num); memcpy(to, &val, 8); } while(0) |
|
◆ _msgpack_load16
#define _msgpack_load16 |
( |
|
cast, |
|
|
|
from, |
|
|
|
to |
|
) |
| |
Value: do { \
memcpy((cast*)(to), (from), sizeof(cast)); \
*(to) = (cast)_msgpack_be16(*(to)); \
} while (0);
◆ _msgpack_load32
#define _msgpack_load32 |
( |
|
cast, |
|
|
|
from, |
|
|
|
to |
|
) |
| |
Value: do { \
memcpy((cast*)(to), (from), sizeof(cast)); \
*(to) = (cast)_msgpack_be32(*(to)); \
} while (0);
◆ _msgpack_load64
#define _msgpack_load64 |
( |
|
cast, |
|
|
|
from, |
|
|
|
to |
|
) |
| |
Value: do { \
memcpy((cast*)(to), (from), sizeof(cast)); \
*(to) = (cast)_msgpack_be64(*(to)); \
} while (0);
◆ _msgpack_store16
#define _msgpack_store16 |
( |
|
to, |
|
|
|
num |
|
) |
| do { uint16_t val = _msgpack_be16(num); memcpy(to, &val, 2); } while(0) |
◆ _msgpack_store32
#define _msgpack_store32 |
( |
|
to, |
|
|
|
num |
|
) |
| do { uint32_t val = _msgpack_be32(num); memcpy(to, &val, 4); } while(0) |
◆ _msgpack_store64
#define _msgpack_store64 |
( |
|
to, |
|
|
|
num |
|
) |
| do { uint64_t val = _msgpack_be64(num); memcpy(to, &val, 8); } while(0) |
◆ _msgpack_sync_decr_and_fetch
#define _msgpack_sync_decr_and_fetch |
( |
|
ptr | ) |
__sync_sub_and_fetch(ptr, 1) |
◆ _msgpack_sync_incr_and_fetch
#define _msgpack_sync_incr_and_fetch |
( |
|
ptr | ) |
__sync_add_and_fetch(ptr, 1) |
◆ MSGPACK_DLLEXPORT
#define MSGPACK_DLLEXPORT |
◆ MSGPACK_ENDIAN_BIG_BYTE
#define MSGPACK_ENDIAN_BIG_BYTE BOOST_ENDIAN_BIG_BYTE |
◆ MSGPACK_ENDIAN_LITTLE_BYTE
#define MSGPACK_ENDIAN_LITTLE_BYTE BOOST_ENDIAN_LITTLE_BYTE |
◆ _msgpack_atomic_counter_t