mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[9449] Fixes for the Solaris platform.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
c8e45058a6
commit
f40f564bd6
6 changed files with 50 additions and 3 deletions
|
|
@ -75,6 +75,10 @@
|
|||
#include <signal.h>
|
||||
#include <assert.h>
|
||||
|
||||
#if defined(__sun__)
|
||||
#include <ieeefp.h> // finite() on Solaris
|
||||
#endif
|
||||
|
||||
#include <set>
|
||||
#include <list>
|
||||
#include <string>
|
||||
|
|
|
|||
|
|
@ -95,7 +95,11 @@ int ThreadPriority::getPriority(Priority p) const
|
|||
return m_priority[p];
|
||||
}
|
||||
|
||||
#define THREADFLAG (THR_NEW_LWP | THR_SCHED_DEFAULT| THR_JOINABLE)
|
||||
#ifndef __sun__
|
||||
# define THREADFLAG (THR_NEW_LWP | THR_JOINABLE | THR_SCHED_DEFAULT)
|
||||
#else
|
||||
# define THREADFLAG (THR_NEW_LWP | THR_JOINABLE)
|
||||
#endif
|
||||
|
||||
Thread::Thread() : m_task(0), m_iThreadId(0), m_hThreadHandle(0)
|
||||
{
|
||||
|
|
@ -220,10 +224,12 @@ Thread * Thread::current()
|
|||
|
||||
void Thread::setPriority(Priority type)
|
||||
{
|
||||
#ifndef __sun__
|
||||
int _priority = m_TpEnum.getPriority(type);
|
||||
int _ok = ACE_Thread::setprio(m_hThreadHandle, _priority);
|
||||
//remove this ASSERT in case you don't want to know is thread priority change was successful or not
|
||||
ASSERT (_ok == 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
void Thread::Sleep(unsigned long msecs)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "9448"
|
||||
#define REVISION_NR "9449"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue