X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2450225e87fa312300e72e82d14b1ca76c0b9d87..ed0dd9c1f0e9a79b5110d59b903a5f1fd9ee6c42:/src/unix/threadpsx.cpp?ds=sidebyside diff --git a/src/unix/threadpsx.cpp b/src/unix/threadpsx.cpp index 142268d1b0..95d8586f91 100644 --- a/src/unix/threadpsx.cpp +++ b/src/unix/threadpsx.cpp @@ -45,6 +45,7 @@ #include #include #include +#include // needed for at least __QNX__ #ifdef HAVE_SCHED_H #include #endif @@ -56,9 +57,7 @@ // we use wxFFile under Linux in GetCPUCount() #ifdef __LINUX__ #include "wx/ffile.h" - // For setpriority. - #include - #include + #include // for setpriority() #endif #ifdef __VMS @@ -1477,6 +1476,11 @@ wxThreadError wxThread::Delete(ExitCode *rc) } //else: can't wait for detached threads } + + if (state == STATE_NEW) + return wxTHREAD_MISC_ERROR; + // for coherency with the MSW implementation, signal the user that + // Delete() was called on a thread which didn't start to run yet. return wxTHREAD_NO_ERROR; }