ObReferenceObject can be called at DISPATCH_LEVEL, which means it both
can run at the same IRQL as an ordinary spin lock and that it must not
take very long to run. I can't imagine it calling back into my driver
because it's probably not much more than an interlocked increment.
Any specific reason ("no outcalls" is a little general) why
ObReferenceObject should not be safe to call while holding a spin
lock?

(so that I don't have to go through my code and change some of my spin
lock usage to a fast mutex)

Re: ObReferenceObject while holding a spin lock by Don

Don
Fri Dec 22 15:48:06 CST 2006

There should be no problem, all the call does is find the header for the
object and do an InterlockedIncrement on it.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply


<BubbaGump> wrote in message
news:hljoo2lu0v7jqnpdu5ccqh4uaebimvvopl@4ax.com...
> ObReferenceObject can be called at DISPATCH_LEVEL, which means it both
> can run at the same IRQL as an ordinary spin lock and that it must not
> take very long to run. I can't imagine it calling back into my driver
> because it's probably not much more than an interlocked increment.
> Any specific reason ("no outcalls" is a little general) why
> ObReferenceObject should not be safe to call while holding a spin
> lock?
>
> (so that I don't have to go through my code and change some of my spin
> lock usage to a fast mutex)
>