UP log
This commit is contained in:
@@ -175,14 +175,14 @@
|
||||
|
||||
|
||||
#ifndef LOG_RUN_TIME
|
||||
#ifndef __PLOOC_VA_NUM_ARGS_IMPL
|
||||
# define __PLOOC_VA_NUM_ARGS_IMPL(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, \
|
||||
#ifndef __LOG_VA_NUM_ARGS_IMPL
|
||||
# define __LOG_VA_NUM_ARGS_IMPL(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, \
|
||||
_12, _13, _14, _15, _16, __N, ...) __N
|
||||
#endif
|
||||
|
||||
#ifndef __PLOOC_VA_NUM_ARGS
|
||||
#define __PLOOC_VA_NUM_ARGS(...) \
|
||||
__PLOOC_VA_NUM_ARGS_IMPL( 0,##__VA_ARGS__,16,15,14,13,12,11,10,9, \
|
||||
#ifndef __LOG_VA_NUM_ARGS
|
||||
#define __LOG_VA_NUM_ARGS(...) \
|
||||
__LOG_VA_NUM_ARGS_IMPL( 0,##__VA_ARGS__,16,15,14,13,12,11,10,9, \
|
||||
8,7,6,5,4,3,2,1,0)
|
||||
#endif
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
__CONNECT9(__A, __B, __C, __D, __E, __F, __G, __H, __I)
|
||||
|
||||
#define CONNECT(...) \
|
||||
ALT_CONNECT2(CONNECT, __PLOOC_VA_NUM_ARGS(__VA_ARGS__))(__VA_ARGS__)
|
||||
ALT_CONNECT2(CONNECT, __LOG_VA_NUM_ARGS(__VA_ARGS__))(__VA_ARGS__)
|
||||
|
||||
#undef __using1
|
||||
#undef __using2
|
||||
@@ -281,7 +281,7 @@
|
||||
)
|
||||
|
||||
#define using(...) \
|
||||
CONNECT2(__using, __PLOOC_VA_NUM_ARGS(__VA_ARGS__))(__VA_ARGS__)
|
||||
CONNECT2(__using, __LOG_VA_NUM_ARGS(__VA_ARGS__))(__VA_ARGS__)
|
||||
|
||||
#ifdef LOG_WITH_RUN_TIMER
|
||||
#define LOG_RUN_TIME(__STR, ...) \
|
||||
@@ -291,7 +291,7 @@
|
||||
__ticks_sync_barrier__(); \
|
||||
_ = LOG_RUN_TIMER_FUN - _; \
|
||||
__time_count__ = _; \
|
||||
if (__PLOOC_VA_NUM_ARGS(__VA_ARGS__) == 0) { \
|
||||
if (__LOG_VA_NUM_ARGS(__VA_ARGS__) == 0) { \
|
||||
LOG_OUT_FUNC("\r\n"); \
|
||||
LOG_OUT_FUNC("-[Run Timer]"); \
|
||||
LOG_OUT_FUNC( \
|
||||
@@ -311,7 +311,7 @@
|
||||
__ticks_sync_barrier__(); \
|
||||
_ = LOG_RUN_TIMER_FUN - _; \
|
||||
__time_count__ = _; \
|
||||
if (__PLOOC_VA_NUM_ARGS(__VA_ARGS__) == 0) { \
|
||||
if (__LOG_VA_NUM_ARGS(__VA_ARGS__) == 0) { \
|
||||
LOG_OUT_FUNC("\r\n"); \
|
||||
LOG_OUT_FUNC("-[Run Timer]"); \
|
||||
LOG_OUT_FUNC( \
|
||||
|
Reference in New Issue
Block a user