GetCurThreadName -> GetCurrentThreadName to match GetCurrentThreadID.
This commit is contained in:
@@ -284,7 +284,7 @@ RageThreadRegister::~RageThreadRegister()
|
|||||||
m_pSlot = NULL;
|
m_pSlot = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *RageThread::GetCurThreadName()
|
const char *RageThread::GetCurrentThreadName()
|
||||||
{
|
{
|
||||||
return GetThreadNameByID( GetCurrentThreadID() );
|
return GetThreadNameByID( GetCurrentThreadID() );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ public:
|
|||||||
|
|
||||||
static uint64_t GetCurrentThreadID();
|
static uint64_t GetCurrentThreadID();
|
||||||
|
|
||||||
static const char *GetCurThreadName();
|
static const char *GetCurrentThreadName();
|
||||||
static const char *GetThreadNameByID( uint64_t iID );
|
static const char *GetThreadNameByID( uint64_t iID );
|
||||||
static bool EnumThreadIDs( int n, uint64_t &iID );
|
static bool EnumThreadIDs( int n, uint64_t &iID );
|
||||||
int Wait();
|
int Wait();
|
||||||
@@ -49,7 +49,7 @@ private:
|
|||||||
static bool s_bIsShowingDialog;
|
static bool s_bIsShowingDialog;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Register a thread created outside of RageThread. This gives it a name for RageThread::GetCurThreadName,
|
/* Register a thread created outside of RageThread. This gives it a name for RageThread::GetCurrentThreadName,
|
||||||
* and allocates a slot for checkpoints. */
|
* and allocates a slot for checkpoints. */
|
||||||
class RageThreadRegister
|
class RageThreadRegister
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ static void parent_process( int to_child, const CrashData *crash )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* 6. Write the crashed thread's name. */
|
/* 6. Write the crashed thread's name. */
|
||||||
p = RageThread::GetCurThreadName();
|
p = RageThread::GetCurrentThreadName();
|
||||||
size = strlen( p )+1;
|
size = strlen( p )+1;
|
||||||
if( !parent_write(to_child, &size, sizeof(size)) )
|
if( !parent_write(to_child, &size, sizeof(size)) )
|
||||||
return;
|
return;
|
||||||
@@ -365,7 +365,7 @@ void CrashHandler::ForceDeadlock( RString reason, uint64_t iID )
|
|||||||
strncpy( crash.m_ThreadName[1], RageThread::GetThreadNameByID(iID), sizeof(crash.m_ThreadName[0])-1 );
|
strncpy( crash.m_ThreadName[1], RageThread::GetThreadNameByID(iID), sizeof(crash.m_ThreadName[0])-1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
strncpy( crash.m_ThreadName[0], RageThread::GetCurThreadName(), sizeof(crash.m_ThreadName[0])-1 );
|
strncpy( crash.m_ThreadName[0], RageThread::GetCurrentThreadName(), sizeof(crash.m_ThreadName[0])-1 );
|
||||||
|
|
||||||
strncpy( crash.reason, reason, min(sizeof(crash.reason) - 1, reason.length()) );
|
strncpy( crash.reason, reason, min(sizeof(crash.reason) - 1, reason.length()) );
|
||||||
crash.reason[ sizeof(crash.reason)-1 ] = 0;
|
crash.reason[ sizeof(crash.reason)-1 ] = 0;
|
||||||
@@ -394,7 +394,7 @@ void CrashHandler::CrashSignalHandler( int signal, siginfo_t *si, const ucontext
|
|||||||
BacktraceAllThreads( crash );
|
BacktraceAllThreads( crash );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
strncpy( crash.m_ThreadName[0], RageThread::GetCurThreadName(), sizeof(crash.m_ThreadName[0])-1 );
|
strncpy( crash.m_ThreadName[0], RageThread::GetCurrentThreadName(), sizeof(crash.m_ThreadName[0])-1 );
|
||||||
|
|
||||||
RunCrashHandler( &crash );
|
RunCrashHandler( &crash );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user