Slightly de-uglify Unix version of wxThreadInternal::Create()
Just use wxUnusedVar() instead of defining and using the ugly WXUNUSED_STACKSIZE() macro. Also change an out of date comment as the thread priority is not the only attribute being changed here. No real changes.
This commit is contained in:
parent
606dc18e5f
commit
29c218f1b4
@ -987,14 +987,7 @@ wxThreadInternal::~wxThreadInternal()
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef HAVE_PTHREAD_ATTR_SETSTACKSIZE
|
||||
#define WXUNUSED_STACKSIZE(identifier) identifier
|
||||
#else
|
||||
#define WXUNUSED_STACKSIZE(identifier) WXUNUSED(identifier)
|
||||
#endif
|
||||
|
||||
wxThreadError wxThreadInternal::Create(wxThread *thread,
|
||||
unsigned int WXUNUSED_STACKSIZE(stackSize))
|
||||
wxThreadError wxThreadInternal::Create(wxThread *thread, unsigned int stackSize)
|
||||
{
|
||||
if ( GetState() != STATE_NEW )
|
||||
{
|
||||
@ -1002,13 +995,15 @@ wxThreadError wxThreadInternal::Create(wxThread *thread,
|
||||
return wxTHREAD_RUNNING;
|
||||
}
|
||||
|
||||
// set up the thread attribute: right now, we only set thread priority
|
||||
// set up the thread attribute: such as priority and stack size
|
||||
pthread_attr_t attr;
|
||||
pthread_attr_init(&attr);
|
||||
|
||||
#ifdef HAVE_PTHREAD_ATTR_SETSTACKSIZE
|
||||
if (stackSize)
|
||||
pthread_attr_setstacksize(&attr, stackSize);
|
||||
#else
|
||||
wxUnusedVar(stackSize);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_THREAD_PRIORITY_FUNCTIONS
|
||||
|
Loading…
Reference in New Issue
Block a user