diff options
Diffstat (limited to 'vespalog')
-rw-r--r-- | vespalog/src/vespa/log/log.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/vespalog/src/vespa/log/log.cpp b/vespalog/src/vespa/log/log.cpp index 2e19dda504c..47f7377ac4d 100644 --- a/vespalog/src/vespa/log/log.cpp +++ b/vespalog/src/vespa/log/log.cpp @@ -39,12 +39,20 @@ char Logger::_hostname[1024] = { '\0'}; char Logger::_serviceName[1024] = {'\0' }; ControlFile *Logger::_controlFile = 0; -static inline unsigned long gettid(const void *tid) { - return reinterpret_cast<uint64_t>(tid) >> 3; -} +namespace { + +class GetTid { +public: + unsigned long operator()(const void *tid) const { + return reinterpret_cast<uint64_t>(tid) >> 3; + } + unsigned long operator()(unsigned long tid) const { + return tid; + } +}; + +GetTid gettid; -static inline unsigned long gettid(unsigned long tid) { - return tid; } void |