name the main thread

This commit is contained in:
Glenn Maynard
2003-07-27 03:13:40 +00:00
parent 7fdbfa4879
commit 1414f9149b
+10
View File
@@ -17,6 +17,10 @@
#include "RageLog.h" #include "RageLog.h"
#include "RageUtil.h" #include "RageUtil.h"
#ifdef _WINDOWS
#include "archutils/win32/tls.h"
#endif
#include "SDL_utils.h" #include "SDL_utils.h"
#include <signal.h> #include <signal.h>
@@ -110,6 +114,11 @@ void ThreadSlot::SetupThisThread()
#if defined(PID_BASED_THREADS) #if defined(PID_BASED_THREADS)
pid = getpid(); pid = getpid();
#endif #endif
#ifdef _WINDOWS
InitThreadData( name );
#endif
threadid = SDL_ThreadID(); threadid = SDL_ThreadID();
} }
@@ -165,6 +174,7 @@ struct SetupMainThread
SetupMainThread() SetupMainThread()
{ {
int slot = FindEmptyThreadSlot(); int slot = FindEmptyThreadSlot();
strcpy( g_ThreadSlots[slot].name, "main thread" );
g_ThreadSlots[slot].SetupThisThread(); g_ThreadSlots[slot].SetupThisThread();
} }
} SetupMainThreadObj; } SetupMainThreadObj;