- Completely reimplement NtWaitForMultipleObjects:
- Check for invalid Objectcount and wait type
- Don't use 2.6KB of stack space (kernel threads only get 4...)
- Don't call ObReferenceObjectByHandle since it does a lot of superflous checks, continous locking/unlocking and makes us extremly slow for a large wait and also doesn't give us the full flexibility we need.
- Detect if a Waitall is being done with the same object duplicated.
- Protect wait with SEH.
- General fixes for all NtWaitXXX:
- Use DefaultObject from Object Header and remove all previous associated hacks, including the IO_TYPE hack. The DefaultObject will either be NULL, an offset to an internal Object Event, or a pointer to a default event. We handle all three.
- Guard the KeWaitXXX call with SEH since it can raise exceptions.
- Fix all object type intiailizers regarding DefaultObject.
svn path=/trunk/; revision=17179
12 files changed: