Matt,
I’m trying to envision what one could use such an interface for, given
that the answer you might get back will be potentially invalid when you
actually test it.
In other words, suppose that this API exists and you try to use it:
IsLockAcquired = ExCheckIfResourceIsAcquired(lock);
If (IsLockAcquired) { … }
Of course, nothing prevents the state of the lock from changing between
the assignment and the test - you might have been descheduled, many
other threads might have run, and then you reacquired the CPU. It is
hard for me to envision logic that makes too much sense here.
KeReadStateEvent is only useful for notification events, not
synchronization events, and you still have to be aware that the system
state might change between the poll and the actual test of the event
state.
So, to answer your question: no, there is no equivalent.
Regards,
Tony
Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Matthew N. White
Sent: Friday, February 13, 2004 3:48 PM
To: ntfsd redirect
Subject: [ntfsd] ERESOURCE equiv to KeReadStateEvent?
Does anyone know of an API that will give me information on whether an
ERESOURCE is actually acquired or not w/o actually trying to acquire it?
Basically, I’m looking for the equivalent of KeReadStateEvent, but for
ERESOURCES. “ExIsResourceAcquiredLite” and friends seem to just give
information on whether the current thread has it acquired, not whether
it is acquired by other threads…
TIA,
Matt
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@osr.com To unsubscribe
send a blank email to xxxxx@lists.osr.com