Real-Time Priority System Levels (Windows CE 5.0)

Send Feedback

The priority system has 256 Priority Levels numbered 0 (zero) through 255. Priority level 0 is the highest priority level. The original 8 priority levels for Microsoft Windows CE 2.12 and earlier versions are mapped to levels 248 through 255.

Applications and device drivers should use the CeGetThreadPriority and CeSetThreadPriority APIs, instead of the legacy APIs GetThreadPriority and SetThreadPriority. The legacy APIs are still available with the same interfaces as before, but those APIs have access only to the original 8 priority levels.

The priority level system is divided into four ranges. The following table shows these ranges.

Levels Description
0 through 96 Reserved for real-time above drivers
97 through 152 Used by the default Windows CE–based device drivers
153 through 247 Reserved for real-time below drivers
248 through 255 Mapped to non-real-time priorities

Note   Threads in non-trusted applications can use thread priorities 248 through 255. Threads in trusted applications can use any thread priority. For more information about creating a trusted environment, see Trusted Environment Creation.

The following table shows the default priority levels associated with device drivers. You can override these values by changing the source code for the drivers or by setting values in the registry. The registry paths in the table assume that the root Drivers key is HKEY_LOCAL_MACHINE\Drivers\BuiltIn; the registry uses hexadecimal values for the priority levels. This data is also in %_WINCEROOT%\Public\Common\OAK\Drivers\Realtime.txt.

Decimal priority Hexadecimal priority Device driver Override
99 0x63 Power Manager resume thread HKEY_LOCAL_MACHINE\CurrentControlSet\Control\Power\ResumePriority256
100 0x64 USB Function None
101, also uses +1 and -1 relative priorities 0x65, also uses +1 and -1 relative priorities USB OHCD HKEY_LOCAL_MACHINE\Drivers\BuiltIn\OHCI\Priority256
101, also uses +1, +3, +5 and +7 relative priorities 0x65, also uses +1, +3, +5, and +7 relative priorities USB UHCD HKEY_LOCAL_MACHINE\Drivers\BuiltIn\UHCI\Priority256
103 0x67 Serial HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Serial\Priority256
105, also uses +1 and +2 relative priorities 0x69, also uses +1 and +2 relative priorities PCMCIA HKEY_LOCAL_MACHINE\Drivers\PCMCIA\Priority256
109 0x6D Touch HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Touch\Priority256
110, also uses +2 and +4 relative priorities 0x6E, also uses +2 and +4 relative priorities IRSIR HKEY_LOCAL_MACHINE\Comm\Irsir1\Parms\Priority256
116, also uses +2, +4, +6, +8, +10 and +12 relative priorities 0x74, also uses +2, +4, +6, +8, +10, and +12 relative priorities NDIS HKEY_LOCAL_MACHINE\Drivers\BuiltIn\NDIS\Priority256
131 0x83 KITL Override in the OAL. In OEMInit, set g_dwKITLThreadPriority (extern DWORD) to the desired priority before calling KitlInit.
131 0x83 VMINI HKEY_LOCAL_MACHINE\Comm\VMini\Priority256
132 0x84 CxPort HKEY_LOCAL_MACHINE\Comm\Cxport\Priority256
148 0x94 IR Comm HKEY_LOCAL_MACHINE\Drivers\BuiltIn\IrComm\Priority256
150 0x96 TAPI (Unimodem) HKEY_LOCAL_MACHINE\Drivers\Unimodem\Priority256
210 0xD2 WaveDev HKEY_LOCAL_MACHINE\Drivers\BuiltIn\WaveDev\Priority256
248 0xF8 PM (Power Manager) HKEY_LOCAL_MACHINE\CurrentControlSet\Control\Power\Priority256
249 0xF9 Power Manager device registration thread HKEY_LOCAL_MACHINE\CurrentControlSet\Control\Power\PnPPriority256
249 0xF9 Power Manager system management thread HKEY_LOCAL_MACHINE\CurrentControlSet\Control\Power\SystemPriority256
249 0xF9 Power Manager activity timer thread HKEY_LOCAL_MACHINE\CurrentControlSet\Control\Power\TimerPriority256
250 0xFA WaveAPI HKEY_LOCAL_MACHINE\Drivers\BuiltIn\WAPIMAN\Priority256
251 0xFB Power Manager battery monitor thread HKEY_LOCAL_MACHINE\CurrentControlSet\Control\Power\PowerPollPriority256

See Also

Real-Time Priority System | Real-Time Priority System Response Times

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.