Share via


Priority Levels

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

Windows Mobile offers 256 priority levels, with zero being the highest priority and 255 the lowest.

The original eight priority levels of Windows CE 2.12 are mapped to levels 255 through 248, which are defined for application threads.

Priority levels 247 through zero are assigned to real-time applications, drivers, and system processes.

To prevent random applications from degrading the performance of the system, OEMs can restrict all priority levels between 247 and zero to OEM-specified applications. For information on your target device's available priority levels, consult the OEM.

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

Use CeSetThreadPriority and SetThreadPriority to set the priority level of a thread.

Use CeGetThreadPriority and GetThreadPriority to obtain the priority level of a thread.

The priority level system has four ranges, shown in the following table.

Range Description

0 through 96

Reserved for real-time above drivers.

97 through 152

Used by the default Windows Mobile device drivers.

153 through 247

Reserved for real-time below drivers.

248 through 255

Maps to non-real-time priorities.

For more information about the default priority levels associated with device drivers, see Real-Time Priority System Levels.

See Also

Concepts

Processes and Threads