Real-Time Priority System Levels

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 previous 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 broken into four ranges. These ranges are shown in the following table.

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 Maps to non-real-time priorities.

The following table lists the default priority levels associated with device drivers. You can override these values either by changing the source code for the drivers, or by setting values in the registry. The registry paths shown in the following table assume that the root Drivers key is HKEY_LOCAL_MACHINE\Drivers\BuiltIn; keep in mind that 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
20 0x14 Permedia3 vertical retrace HKEY_LOCAL_MACHINE\Drivers\Display\Permedia3\Priority256
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
145 0x91 PS/2 Keyboard HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\KEYBD\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 TVIA5000 Display HKEY_LOCAL_MACHINE\Drivers\Display\TVIA5000\Priority256
249 0xF9 PS/2 Mouse HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\MOUSE\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

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.