PebbleOS
Loading...
Searching...
No Matches
Macros
log_hashing.h File Reference
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <pbl/kernel/compiler.h>

Macros

#define NEW_LOG_VERSION   "0102"
 Version of the .log_strings format, major and minor on two digits each.
 
#define LOG_STRINGS_SECTION_ADDRESS   0xC0000000
 Address the .log_strings section is linked at; tokens are offsets from it.
 
#define PACKED_CORE_OFFSET   30
 Position of the core number in a message ID.
 
#define PACKED_CORE_MASK   0x03
 Mask of the core number, 2 bits.
 
#define PACKED_NUM_FMT_OFFSET   29
 Position of the number of format conversions in a token.
 
#define PACKED_NUM_FMT_MASK   0x07
 Mask of the number of format conversions, 3 bits.
 
#define PACKED_STR1FMT_OFFSET   26
 Position of the first string conversion index in a token.
 
#define PACKED_STR1FMT_MASK   0x07
 Mask of the first string conversion index, 3 bits.
 
#define PACKED_STR2FMT_OFFSET   23
 Position of the second string conversion index in a token.
 
#define PACKED_STR2FMT_MASK   0x07
 Mask of the second string conversion index, 3 bits.
 
#define PACKED_STRFMTS_OFFSET   23
 Position of both string conversion indices in a token.
 
#define PACKED_STRFMTS_MASK   0x3f
 Mask of both string conversion indices, 6 bits.
 
#define PACKED_LEVEL_OFFSET   20
 Position of the packed level in a token.
 
#define PACKED_LEVEL_MASK   0x07
 Mask of the packed level, 3 bits.
 
#define PACKED_HASH_OFFSET   0
 Position of the string offset in a token.
 
#define PACKED_HASH_MASK   0x7FFFF
 Mask of the string offset, 19 bits.
 
#define MSGID_STR_AND_HASH_MASK    ((PACKED_STRFMTS_MASK << PACKED_STRFMTS_OFFSET) | (PACKED_HASH_MASK << PACKED_HASH_OFFSET))
 Mask of the string indices and string offset of a message ID.
 
#define MSGID_CORE_AND_HASH_MASK    ((PACKED_CORE_MASK << PACKED_CORE_OFFSET) | (PACKED_HASH_MASK << PACKED_HASH_OFFSET))
 Mask of the core number and string offset of a message ID.
 
#define STRINGIFY_NX(a)   #a
 Turn the argument into a string literal without expanding it.
 
#define STRINGIFY(a)   STRINGIFY_NX(a)
 Turn the expansion of the argument into a string literal.