From 841daea6daa38c7843151c7b972ff2c6f8be5ed3 Mon Sep 17 00:00:00 2001 From: vl Date: Thu, 13 May 2010 19:00:29 +0200 Subject: [PATCH] Changed: #872 threadid is now in size_t. patch by rti --- code/nel/include/nel/misc/common.h | 2 +- code/nel/src/misc/common.cpp | 4 ++-- code/nel/src/net/unified_network.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/nel/include/nel/misc/common.h b/code/nel/include/nel/misc/common.h index f72a4dd3b..4f5bacb75 100644 --- a/code/nel/include/nel/misc/common.h +++ b/code/nel/include/nel/misc/common.h @@ -298,7 +298,7 @@ void nlSleep( uint32 ms ); #endif /// Returns Thread Id (note: on Linux, Process Id is the same as the Thread Id) -uint getThreadId(); +size_t getThreadId(); /// Returns a readable string from a vector of bytes. unprintable char are replaced by '?' std::string stringFromVector( const std::vector& v, bool limited = true ); diff --git a/code/nel/src/misc/common.cpp b/code/nel/src/misc/common.cpp index 55b50a219..f51ac4c71 100644 --- a/code/nel/src/misc/common.cpp +++ b/code/nel/src/misc/common.cpp @@ -107,12 +107,12 @@ void nlSleep( uint32 ms ) /* * Returns Thread Id (note: on Linux, Process Id is the same as the Thread Id) */ -uint getThreadId() +size_t getThreadId() { #ifdef NL_OS_WINDOWS return GetCurrentThreadId(); #elif defined NL_OS_UNIX - return uint(pthread_self()); + return size_t(pthread_self()); // doesnt work on linux kernel 2.6 return getpid(); #endif diff --git a/code/nel/src/net/unified_network.cpp b/code/nel/src/net/unified_network.cpp index a15f12fbb..5e3e4689c 100644 --- a/code/nel/src/net/unified_network.cpp +++ b/code/nel/src/net/unified_network.cpp @@ -34,7 +34,7 @@ using namespace NLMISC; namespace NLNET { -static uint ThreadCreator = 0; +static size_t ThreadCreator = 0; static const uint64 AppIdDeadConnection = 0xDEAD;