tags:

views:

35

answers:

0

Hi,

I'd like to properly annotate the IRQL changes in a windows kernel driver, but I can't figure out how to do it right. Here are the functions:

__drv_maxIRQL(APC_LEVEL)
__drv_savesIRQLGlobal(evlist, list)
__drv_setsIRQL(APC_LEVEL)
void evlist_lock(evlist_s* list) {
  ExAcquireFastMutex(&list->lock);
}

__drv_requiresIRQL(APC_LEVEL)
__drv_restoresIRQLGlobal(evlist, list)
void evlist_unlock(evlist_s* list) {
  ExReleaseFastMutex(&list->lock);
}

But PFD always complains:

The IRQL in '#evlist:list' was never restored

No IRQL was saved into '#evlist:list'

What do I have to supply as "kind" and "param" for __drv_saves/restoresIRQLGlobal, so that PFD is happy?

Cheers,

bman