mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-29 15:16:01 +00:00
Changed: #872 threadid is now in size_t. patch by rti
This commit is contained in:
parent
215b70a98c
commit
841daea6da
3 changed files with 4 additions and 4 deletions
|
@ -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<uint8>& v, bool limited = true );
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ using namespace NLMISC;
|
|||
|
||||
namespace NLNET {
|
||||
|
||||
static uint ThreadCreator = 0;
|
||||
static size_t ThreadCreator = 0;
|
||||
|
||||
static const uint64 AppIdDeadConnection = 0xDEAD;
|
||||
|
||||
|
|
Loading…
Reference in a new issue