At http://msdn2.microsoft.com/en-us/library/ms913056.aspx it is stated that "All threads initially start at THREAD_PRIORITY_NORMAL (251)."
Currently I use CeSetThreadPriority(GetCurrentThread(), priority); where priority is between 248 and 254 to run threads in background. If I remember well, this priority value has changed between WinCE versions. So I hope everything is ok with this patch. Pascal Matthew Kille a écrit : > Hi Guys, > > We've noticed there is some difference between thread priority defines > in cegcc's winbase.h header compared to the MS WinCE SDK version. This > had a significant impact on the apparent performance of our software > where new threads were being created using the win32 values. > > Here's the suggested patch:- > > --- cegcc/src/w32api/include/winbase.h (revision 1069) > +++ cegcc/src/w32api/include/winbase.h (working copy) > @@ -258,6 +258,16 @@ > #define GET_TAPE_DRIVE_INFORMATION 1 > #define SET_TAPE_MEDIA_INFORMATION 0 > #define SET_TAPE_DRIVE_INFORMATION 1 > +#ifdef _WIN32_WCE > +#define THREAD_PRIORITY_TIME_CRITICAL 0 > +#define THREAD_PRIORITY_HIGHEST 1 > +#define THREAD_PRIORITY_ABOVE_NORMAL 2 > +#define THREAD_PRIORITY_NORMAL 3 > +#define THREAD_PRIORITY_BELOW_NORMAL 4 > +#define THREAD_PRIORITY_LOWEST 5 > +#define THREAD_PRIORITY_ABOVE_IDLE 6 > +#define THREAD_PRIORITY_IDLE 7 > +#else > #define THREAD_PRIORITY_ABOVE_NORMAL 1 > #define THREAD_PRIORITY_BELOW_NORMAL (-1) > #define THREAD_PRIORITY_HIGHEST 2 > @@ -265,6 +275,7 @@ > #define THREAD_PRIORITY_LOWEST (-2) > #define THREAD_PRIORITY_NORMAL 0 > #define THREAD_PRIORITY_TIME_CRITICAL 15 > +#endif > #define THREAD_PRIORITY_ERROR_RETURN 2147483647 > #define TIME_ZONE_ID_UNKNOWN 0 > #define TIME_ZONE_ID_STANDARD 1 > > -- > Matt. > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Cegcc-devel mailing list > Cegcc-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/cegcc-devel > > > ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Cegcc-devel mailing list Cegcc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cegcc-devel