Skip to content

Conversation

@mediantt
Copy link

No description provided.


WI_NODISCARD
inline _IRQL_requires_max_(APC_LEVEL)
_IRQL_raises_(APC_LEVEL)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ExTryToAcquire... only raises to APC_LEVEL if it acquired the mutex. See https://learn.microsoft.com/en-us/windows-hardware/drivers/devtest/irql-annotations-for-drivers and https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-extrytoacquirefastmutex .. This probably needs a When() in here, like:

_When_(return, _IRQL_raises_(APC_LEVEL) _IRQ_saves_global_(OldIrql, return))

Not sure how to have the return peek into the returned object to see if it's active or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants