- // translate wxWindows priority to the Windows one
- int win_priority;
- if (m_priority <= 20)
- win_priority = THREAD_PRIORITY_LOWEST;
- else if (m_priority <= 40)
- win_priority = THREAD_PRIORITY_BELOW_NORMAL;
- else if (m_priority <= 60)
- win_priority = THREAD_PRIORITY_NORMAL;
- else if (m_priority <= 80)
- win_priority = THREAD_PRIORITY_ABOVE_NORMAL;
- else if (m_priority <= 100)
- win_priority = THREAD_PRIORITY_HIGHEST;
+void wxThreadInternal::SetPriority(
+ unsigned int nPriority
+)
+{
+ // translate wxWindows priority to the PM one
+ ULONG ulOS2_PriorityClass;
+ ULONG ulOS2_SubPriority;
+ ULONG ulrc;
+
+ m_nPriority = nPriority;
+ if (m_nPriority <= 25)
+ ulOS2_PriorityClass = PRTYC_IDLETIME;
+ else if (m_nPriority <= 50)
+ ulOS2_PriorityClass = PRTYC_REGULAR;
+ else if (m_nPriority <= 75)
+ ulOS2_PriorityClass = PRTYC_TIMECRITICAL;
+ else if (m_nPriority <= 100)
+ ulOS2_PriorityClass = PRTYC_FOREGROUNDSERVER;