From 92a611f396b57ab6673c8130969aaddb23047d0a Mon Sep 17 00:00:00 2001 From: zhangxiaokun Date: Sat, 23 Jan 2021 18:34:10 +0800 Subject: [PATCH] Format inc/framework/common/debug/ge_log.h --- inc/framework/common/debug/ge_log.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/inc/framework/common/debug/ge_log.h b/inc/framework/common/debug/ge_log.h index d5b673c4..1b293201 100644 --- a/inc/framework/common/debug/ge_log.h +++ b/inc/framework/common/debug/ge_log.h @@ -21,6 +21,7 @@ #include "framework/common/ge_inner_error_codes.h" #include "toolchain/slog.h" + #ifdef __GNUC__ #include #include @@ -35,21 +36,20 @@ extern "C" { #define GE_MODULE_NAME static_cast(GE) // trace status of log -enum TraceStatus { TRACE_INIT = 0, TRACE_RUNNING, TRACE_WAITING, TRACE_STOP }; +enum TraceStatus { + TRACE_INIT = 0, TRACE_RUNNING, TRACE_WAITING, TRACE_STOP +}; class GeLog { -public: + public: + static uint64_t GetTid() { #ifdef __GNUC__ -static uint64_t GetTid() { - thread_local static uint64_t tid = static_cast(syscall(__NR_gettid)); - return tid; -} + thread_local static uint64_t tid = static_cast(syscall(__NR_gettid)); #else -static uint64_t GetTid() { - thread_local static uint64_t tid = static_cast(GetCurrentThreadId()); - return tid; -} + thread_local static uint64_t tid = static_cast(GetCurrentThreadId()); #endif + return tid; + } }; inline bool IsLogEnable(int module_name, int log_level) {