changes to thread code (directly use boost::thread)
- removes our NewThread() function an replaces remaining calls with boost::thread with our TraceThread template - remove ExitThread() function - fix THREAD_PRIORITY_ABOVE_NORMAL for non Windows OSes
This commit is contained in:
@@ -488,8 +488,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
bool NewThread(void(*pfn)(void*), void* parg);
|
||||
|
||||
#ifdef WIN32
|
||||
inline void SetThreadPriority(int nPriority)
|
||||
{
|
||||
@@ -500,7 +498,7 @@ inline void SetThreadPriority(int nPriority)
|
||||
#define THREAD_PRIORITY_LOWEST PRIO_MAX
|
||||
#define THREAD_PRIORITY_BELOW_NORMAL 2
|
||||
#define THREAD_PRIORITY_NORMAL 0
|
||||
#define THREAD_PRIORITY_ABOVE_NORMAL 0
|
||||
#define THREAD_PRIORITY_ABOVE_NORMAL (-2)
|
||||
|
||||
inline void SetThreadPriority(int nPriority)
|
||||
{
|
||||
@@ -512,11 +510,6 @@ inline void SetThreadPriority(int nPriority)
|
||||
setpriority(PRIO_PROCESS, 0, nPriority);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void ExitThread(size_t nExitCode)
|
||||
{
|
||||
pthread_exit((void*)nExitCode);
|
||||
}
|
||||
#endif
|
||||
|
||||
void RenameThread(const char* name);
|
||||
|
||||
Reference in New Issue
Block a user