none
How to pick a KeSetEvent Increment value? RRS feed

  • Question

  • NTKERNELAPI LONG KeSetEvent( PRKEVENT Event, KPRIORITY Increment, BOOLEAN Wait );

    I have a user mode program that passes an Event handle to a kernel driver. The program then waits on the Event. When the driver is ready, it calls KeSetEvent to wake up the program. In this arrangement, what should I use as the "Increment" value? Thanks.


    • Edited by Dev10110110 Thursday, September 13, 2018 1:58 AM
    Thursday, September 13, 2018 1:58 AM

Answers

  • That depends upon how much latency you can tolerate between the driver setting the event and the thread waking up. The value for Increment is a priority boost given to the waiting thread when it awakens. If it isn't critical, use zero (IO_NO_INCREMENT); otherwise, look at the definition of the other constants where IO_NO_INCREMENT is defined and pick one that seems appropriate.

     -Brian


    Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting. Blog at www.azius.com/blog

    Thursday, September 13, 2018 3:57 AM
    Moderator