- Completely reimplement NtWaitForMultipleObjects:
authorAlex Ionescu <aionescu@gmail.com>
Sun, 7 Aug 2005 21:29:51 +0000 (21:29 +0000)
committerAlex Ionescu <aionescu@gmail.com>
Sun, 7 Aug 2005 21:29:51 +0000 (21:29 +0000)
commit4c1eb86320302193aceb94f3c1bb6ae5391b06c1
tree61f3faabc062b0f1b6b425e6534d01ee8e6d4af4
parenta6b3bd07b6ffedd7748379b94c7d3bd34245e9a0
- 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:
reactos/ntoskrnl/ex/callback.c
reactos/ntoskrnl/ex/event.c
reactos/ntoskrnl/ex/mutant.c
reactos/ntoskrnl/ex/profile.c
reactos/ntoskrnl/ex/win32k.c
reactos/ntoskrnl/include/internal/ex.h
reactos/ntoskrnl/include/ntoskrnl.h
reactos/ntoskrnl/io/iomgr.c
reactos/ntoskrnl/ke/wait.c
reactos/ntoskrnl/ob/handle.c
reactos/ntoskrnl/ob/wait.c
reactos/ntoskrnl/ps/psmgr.c