I have a driver thread that I want to stay at a low priority, but it doesn't use any
significant CPU time. The thread's base priority is 1, but its priority keeps
getting bumped if some higher priority CPU bound process is running.
(The documentation says the priority 0 is reserved.)
The best we can come up with is to add a loop where we read the current
priority. If its 1, we break out of the loop. Otherwise set the priority to
1 (KeSetPriorityThread). The theory is that KeSetPriorityThread
will context switch to a higher priority thread if there is one ready.
Therefore when we exit the loop, there are no ready threads of
higher priority than 1.
Will this work?
-DH
--
Dave Harvey, System Software Solutions, Inc.
617-964-7039, FAX 208-361-9395, xxxxx@syssoftsol.com, http://www.syssoftsol.com
Creators of RedunDisks - Robust RAID 1 for embedded systems.