Cleanup.
This commit is contained in:
@@ -84,8 +84,7 @@ void ThreadSlot::ThreadCheckpoint::Set(const char *File_, int Line_, const char
|
|||||||
File=File_;
|
File=File_;
|
||||||
Line=Line_;
|
Line=Line_;
|
||||||
Message=Message_;
|
Message=Message_;
|
||||||
sprintf( FormattedBuf, " %s:%i %s",
|
sprintf( FormattedBuf, " %s:%i %s", File, Line, Message? Message:"" );
|
||||||
File, Line, Message? Message:"" );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *ThreadSlot::ThreadCheckpoint::GetFormattedCheckpoint()
|
const char *ThreadSlot::ThreadCheckpoint::GetFormattedCheckpoint()
|
||||||
@@ -230,7 +229,9 @@ void RageThread::Create( int (*fn)(void *), void *data )
|
|||||||
|
|
||||||
/* If you don't name it, I will: */
|
/* If you don't name it, I will: */
|
||||||
strcpy( m_pSlot->name, "Joe" );
|
strcpy( m_pSlot->name, "Joe" );
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
strcpy( m_pSlot->name, name.c_str() );
|
strcpy( m_pSlot->name, name.c_str() );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -569,7 +570,7 @@ RageMutex::~RageMutex()
|
|||||||
|
|
||||||
void RageMutex::Lock()
|
void RageMutex::Lock()
|
||||||
{
|
{
|
||||||
uint64_t iThisThreadId = (uint64_t) GetThisThreadId();
|
uint64_t iThisThreadId = GetThisThreadId();
|
||||||
if( m_LockedBy == iThisThreadId )
|
if( m_LockedBy == iThisThreadId )
|
||||||
{
|
{
|
||||||
++m_LockCnt;
|
++m_LockCnt;
|
||||||
@@ -612,7 +613,7 @@ void RageMutex::Lock()
|
|||||||
|
|
||||||
bool RageMutex::TryLock()
|
bool RageMutex::TryLock()
|
||||||
{
|
{
|
||||||
if( m_LockedBy == (uint64_t) GetThisThreadId() )
|
if( m_LockedBy == GetThisThreadId() )
|
||||||
{
|
{
|
||||||
++m_LockCnt;
|
++m_LockCnt;
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user