The best way to answer this question is to analyze calls to
KiLockDispatcherDatabase in kernel, but since this function is not exported
it is problematic.
Truly speaking, I was unable to find something called struct DISP_DATABASE,
the database is spreaded over different structures in kernel. An example is
PRKPRCB (KeGetCurrentPrcb()), ExWorkerQueue, different fields in PKTHREAD,
more specifically: PriorityDecrement, Priority, BasePriority, DecrementCount
, Quantum etc.
Volodymyr M. Shcherbyna, blog: http://www.yqcomputer.com/
(This posting is provided "AS IS" with no warranties, and confers no