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

Reply via email to