- Convert KiCallUserMode from asm to C (with a small asm wrapper)
- Convert KiGetUserModeStackAddress into a C inline function
svn path=/trunk/; revision=52855
- Remove Resource functions, as they are in wdm.h
- add KeTryToAcquireQueuedSpinLockRaiseToSynch, ExRaiseHardError & enum members
Patch by Thomas Faber
svn path=/trunk/; revision=52847
- get rid of atexit handling, it's arlready handled by msvcrt.
The funny thing is that the only module using this is msvcrt_winetest, which tested the mingw implementation, not the msvcrt one.
svn path=/trunk/; revision=52828
- link to static crt instead of forwarding function to msvcrt.
As msvcrt, msvcrt20 exports some variable, marked as DATA in the def file. Forwarding them is not a good idea, since msvcrt would be initialized only if one of the forwarded function is called. We must keep those variables in our module. And as the forwarded functions might use the said variables, we can't really forward them, as they would not know which instance they should reference.
svn path=/trunk/; revision=52826
- *Temporarily* back out some rossym/kdbg features until bugs 6372 and 6373 are fixed.
- Traces should be reliable again.
See issue #6372 for more details.
svn path=/trunk/; revision=52825
[KERNEL32]: Bug: QueryMemoryResourceNotification should set ERROR_INVALID_PARAMETER and fail if the Handle is NULL or INVALID_HANDLE_VALUE.
[KERNEL32]: Fix ULONG<->BOOL cast in QueryMemoryResourceNotification as well.
svn path=/trunk/; revision=52817
[KERNEL32]: SetLastError should only set the error code if it's different from the one already set. This is not about optimization: it's compatibility with hardware data breakpoint behavior.
svn path=/trunk/; revision=52816
Bug: RemoveHandles was checking for process AND thread handle match, instead of OR.
Bug: CloseAllProcessHandles and RemoveHandles's processing loop was buggy with its unlinking and re-use of nested ThreadData.
Bug: ProcessIdToHandle was requesting more process rights than needed.
Bug: Some ULONG<->BOOL conversions were dirty (as in, could result in values of 2 or higher).
Bug: In WaitForDebugEvent, During CREATE_PROCESS_DEBUG_EVENT, the wrong handle was saved as the thread handle.
Bug: In WaitForDebugEvent, all events returned TRUE. Instead, only valid events should return TRUE, and non-existing events should return FALSE.
Add some asserts.
Simplify MarkThreadHandle and MarkProcessHandle.
Simplify OutputDebugStringW.
svn path=/trunk/; revision=52813
- move BaseFiberStartup to fiber.S
- add FPO debug info for MSVC builds
- remove excessive END directives (fixes msvc build)
- add a stub for amd64
svn path=/trunk/; revision=52810
[KERNEL32]: BasepInitializeContext was not creating a correct CONTEXT record for fibers: the stack return address was not set (EIP was being used instead), and support for FPU-compatible Fibers was non-existent.
[KERNEL32]: CreateFiberEx was not passing the correct context flags to BasepInitializeContext to notify it that this is an FPU-fiber.
[KERNEL32]: SwitchToFiber was using some weird "FXSR" constant that maps to checking of PowerPC 64-bit Move instructions are available. We actually want to check for XMMI.
svn path=/trunk/; revision=52809