![]() |
MySQL 8.0.43
Source Code Documentation
|
#include "xcom/xcom_common.h"#include "xcom/x_platform.h"#include <stdio.h>#include <stdlib.h>#include "xcom/xcom_logger.h"#include "my_compiler.h"#include <sys/types.h>#include <unistd.h>Go to the source code of this file.
Macros | |
| #define | TASK_DBUG_ON 0 |
| #define | TX_FMT "{" SY_FMT_DEF " %" PRIu32 "}" |
| #define | TX_MEM(x) SY_MEM((x).cfg), (x).pc |
| #define | STR_SIZE 2047 |
| #define | GET_GOUT |
| #define | GET_NEW_GOUT |
| #define | FREE_GOUT xcom_log_buffer[0] = 0 |
| #define | ADD_GOUT(s) xcom_temp_buf = mystrcat(xcom_temp_buf, &xcom_log_buffer_size, s) |
| #define | COPY_AND_FREE_GOUT(s) |
| #define | ADD_F_GOUT(...) |
| #define | PRINT_LOUT(level) xcom_log(level, xcom_log_buffer) |
| #define | PRINT_GOUT xcom_debug("%s", xcom_log_buffer) |
| #define | RET_GOUT return xcom_log_buffer |
| #define | G_LOG_LEVEL(level, ...) |
| #define | G_DEBUG_LEVEL(level, ...) |
| #define | g_critical(...) G_LOG_LEVEL(XCOM_LOG_FATAL, __VA_ARGS__) |
| #define | G_ERROR(...) G_LOG_LEVEL(XCOM_LOG_ERROR, __VA_ARGS__) |
| #define | G_WARNING(...) G_LOG_LEVEL(XCOM_LOG_WARN, __VA_ARGS__) |
| #define | G_MESSAGE(...) G_LOG_LEVEL(XCOM_LOG_INFO, __VA_ARGS__) |
| #define | G_INFO(...) G_LOG_LEVEL(XCOM_LOG_INFO, __VA_ARGS__) |
| #define | G_DEBUG(...) G_DEBUG_LEVEL(XCOM_DEBUG_BASIC | XCOM_DEBUG_TRACE, __VA_ARGS__) |
| #define | G_TRACE(...) G_DEBUG_LEVEL(XCOM_DEBUG_TRACE, __VA_ARGS__) |
| #define | IS_XCOM_DEBUG_WITH(level) xcom_debug_check(level) |
| #define | IDENTIFY |
| #define | DBG_IDENTIFY |
| #define | BIT(n) (1L << n) |
| #define | INFO(x) |
| #define | DBGOUT(x) |
| #define | DBGOUT_ASSERT(expr, dbginfo) |
| #define | NEW_DBG(x) |
| #define | IFDBG(mask, body) |
| #define | XDBG #error |
| #define | FN |
| #define | PTREXP(x) ADD_F_GOUT(#x ": %p ", (void const*)(x)) |
| #define | CONSTPTREXP(x) PTREXP(x) |
| #define | PPUT(x) ADD_F_GOUT("0x%p ", (void *)(x)) |
| #define | STREXP(x) ADD_F_GOUT(#x ": %s ", x) |
| #define | STRLIT(x) ADD_GOUT(x) |
| #define | NPUT(x, f) ADD_F_GOUT("%" #f " ", x) |
| #define | NDBG(x, f) |
| #define | NDBG64(x) |
| #define | NPUT64(x) ADD_F_GOUT("%" PRIu64 " ", x) |
| #define | NEXP(x, f) ADD_F_GOUT(#x ": %" #f " ", x) |
| #define | NUMEXP(x) NEXP(x, d) |
| #define | g_strerror strerror |
| #define | LOUT(pri, x) ADD_F_GOUT(x); |
| #define | SYCEXP(exp) |
| #define | TIDCEXP(exp) |
| #define | TIMECEXP(exp) ADD_F_GOUT(#exp "=%f sec ", (exp)) |
| #define | BALCEXP(exp) ADD_F_GOUT(#exp "={%d %d} ", (exp).cnt, (exp).node) |
Typedefs | |
| typedef enum xcom_dbg_type | xcom_dbg_type |
Enumerations | |
| enum | xcom_dbg_type { D_NONE = 0 , D_TASK = BIT(0) , D_BASE = BIT(1) , D_FSM = BIT(2) , D_TRANSPORT = BIT(3) , D_PROPOSE = BIT(4) , D_DISPATCH = BIT(5) , D_SEMA = BIT(6) , D_XDR = BIT(7) , D_STORE = BIT(8) , D_EXEC = BIT(9) , D_DETECT = BIT(10) , D_ALLOC = BIT(11) , D_FILEOP = BIT(12) , D_CACHE = BIT(13) , D_CONS = BIT(14) , D_BUG = ~0L } |
| enum | { DBG_STACK_SIZE = 256 } |
Functions | |
| double | task_now () |
| char * | mystrcat (char *dest, int *size, const char *src) |
| Concatenates two strings and returns pointer to last character of final string, allowing further concatenations without having to cycle through the entire string again. More... | |
| char * | mystrcat_sprintf (char *dest, int *size, const char *format,...) |
| This function allocates a new string where the format string and optional arguments are rendered to. More... | |
| static int | do_dbg (xcom_dbg_type x) |
| static void | set_dbg (xcom_dbg_type x) |
| static void | unset_dbg (xcom_dbg_type x) |
| static long | get_dbg () |
| static void | push_dbg (long x) |
| static void | pop_dbg () |
| static int | xpid () |
| static char const * | fixpath (char const *x) |
| uint32_t | get_my_xcom_id () |
Variables | |
| xcom_logger | xcom_log |
| Callbacks used in the logging macros. More... | |
| xcom_debugger | xcom_debug |
| xcom_debugger_check | xcom_debug_check |
| int64_t | xcom_debug_options |
| Define the set of debug and trace options that are enabled if there is no debugger check injected. More... | |
| long | xcom_debug_mask |
| long | xcom_dbg_stack [DBG_STACK_SIZE] |
| int | xcom_dbg_stack_top |
| #define ADD_F_GOUT | ( | ... | ) |
| #define ADD_GOUT | ( | s | ) | xcom_temp_buf = mystrcat(xcom_temp_buf, &xcom_log_buffer_size, s) |
| #define BALCEXP | ( | exp | ) | ADD_F_GOUT(#exp "={%d %d} ", (exp).cnt, (exp).node) |
| #define CONSTPTREXP | ( | x | ) | PTREXP(x) |
| #define COPY_AND_FREE_GOUT | ( | s | ) |
| #define DBG_IDENTIFY |
| #define DBGOUT | ( | x | ) |
| #define DBGOUT_ASSERT | ( | expr, | |
| dbginfo | |||
| ) |
| #define FREE_GOUT xcom_log_buffer[0] = 0 |
| #define g_critical | ( | ... | ) | G_LOG_LEVEL(XCOM_LOG_FATAL, __VA_ARGS__) |
| #define G_DEBUG | ( | ... | ) | G_DEBUG_LEVEL(XCOM_DEBUG_BASIC | XCOM_DEBUG_TRACE, __VA_ARGS__) |
| #define G_DEBUG_LEVEL | ( | level, | |
| ... | |||
| ) |
| #define G_ERROR | ( | ... | ) | G_LOG_LEVEL(XCOM_LOG_ERROR, __VA_ARGS__) |
| #define G_INFO | ( | ... | ) | G_LOG_LEVEL(XCOM_LOG_INFO, __VA_ARGS__) |
| #define G_LOG_LEVEL | ( | level, | |
| ... | |||
| ) |
| #define G_MESSAGE | ( | ... | ) | G_LOG_LEVEL(XCOM_LOG_INFO, __VA_ARGS__) |
| #define g_strerror strerror |
| #define G_TRACE | ( | ... | ) | G_DEBUG_LEVEL(XCOM_DEBUG_TRACE, __VA_ARGS__) |
| #define G_WARNING | ( | ... | ) | G_LOG_LEVEL(XCOM_LOG_WARN, __VA_ARGS__) |
| #define GET_GOUT |
| #define GET_NEW_GOUT |
| #define IDENTIFY |
| #define IFDBG | ( | mask, | |
| body | |||
| ) |
| #define INFO | ( | x | ) |
| #define IS_XCOM_DEBUG_WITH | ( | level | ) | xcom_debug_check(level) |
| #define LOUT | ( | pri, | |
| x | |||
| ) | ADD_F_GOUT(x); |
| #define NDBG | ( | x, | |
| f | |||
| ) |
| #define NDBG64 | ( | x | ) |
| #define NEW_DBG | ( | x | ) |
| #define NEXP | ( | x, | |
| f | |||
| ) | ADD_F_GOUT(#x ": %" #f " ", x) |
| #define NPUT | ( | x, | |
| f | |||
| ) | ADD_F_GOUT("%" #f " ", x) |
| #define NPUT64 | ( | x | ) | ADD_F_GOUT("%" PRIu64 " ", x) |
| #define NUMEXP | ( | x | ) | NEXP(x, d) |
| #define PPUT | ( | x | ) | ADD_F_GOUT("0x%p ", (void *)(x)) |
| #define PRINT_GOUT xcom_debug("%s", xcom_log_buffer) |
| #define PRINT_LOUT | ( | level | ) | xcom_log(level, xcom_log_buffer) |
| #define PTREXP | ( | x | ) | ADD_F_GOUT(#x ": %p ", (void const*)(x)) |
| #define RET_GOUT return xcom_log_buffer |
| #define STR_SIZE 2047 |
| #define STREXP | ( | x | ) | ADD_F_GOUT(#x ": %s ", x) |
| #define STRLIT | ( | x | ) | ADD_GOUT(x) |
| #define SYCEXP | ( | exp | ) |
| #define TASK_DBUG_ON 0 |
| #define TIDCEXP | ( | exp | ) |
| #define TIMECEXP | ( | exp | ) | ADD_F_GOUT(#exp "=%f sec ", (exp)) |
| #define TX_FMT "{" SY_FMT_DEF " %" PRIu32 "}" |
| #define TX_MEM | ( | x | ) | SY_MEM((x).cfg), (x).pc |
| #define XDBG #error |
| typedef enum xcom_dbg_type xcom_dbg_type |
| enum xcom_dbg_type |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
| uint32_t get_my_xcom_id | ( | ) |
| char * mystrcat | ( | char * | dest, |
| int * | size, | ||
| const char * | src | ||
| ) |
Concatenates two strings and returns pointer to last character of final string, allowing further concatenations without having to cycle through the entire string again.
| dest | pointer to last character of destination string |
| size | pointer to the number of characters currently added to xcom_log_buffer |
| src | pointer to the string to append to dest |
| char * mystrcat_sprintf | ( | char * | dest, |
| int * | size, | ||
| const char * | format, | ||
| ... | |||
| ) |
This function allocates a new string where the format string and optional arguments are rendered to.
Finally, it invokes mystr_cat to concatenate the rendered string to the string received in the first parameter.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
| double task_now | ( | ) |
|
inlinestatic |
|
inlinestatic |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
Define the set of debug and trace options that are enabled if there is no debugger check injected.
|
extern |
Callbacks used in the logging macros.