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:
Philip Kaufmann
2013-04-23 11:36:54 +02:00
parent a2a2874fc0
commit 53e71135de
3 changed files with 5 additions and 27 deletions

View File

@@ -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);