Commit 7cf34ce8 authored by gabime's avatar gabime

Fixed return type in os::get_thread_id

parent 4dd31bf0
......@@ -171,7 +171,8 @@ inline int utc_minutes_offset(const std::tm& tm = details::os::localtime())
#endif
}
//Return current thread id as 64 bit integer
//Return current thread id as size_t
//It exists because the std::this_thread::get_id() is much slower(espcially under VS 2013)
inline size_t thread_id()
{
......@@ -182,9 +183,9 @@ inline size_t thread_id()
#ifdef _WIN32
return ::GetCurrentThreadId();
#elif __linux__
return (uint64_t) syscall(SYS_gettid);
return syscall(SYS_gettid);
#else
return (uint64_t) pthread_self();
return pthread_self();
#endif
#endif //SPDLOG_NO_THREAD_ID
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment