Hi,
I found this article:
http://msdn.microsoft.com/msdnmag/issues/03/12/CriticalSections/
There are two points of interest that we don't seem to cover:
* RtlpWaitForCriticalSection will NOT block if the process is shutting down and the wait is on the loader lock. I've seen a fair few times when an app deadlocks on shutdown on the loader lock - could this be the cause?
* The loader lock is stored at offset 0xA0 in the PEB. I doubt this is important, but now the info is published murphies law says one day an app will try and get to it directly.
thanks -mike