- Reformat MDL implementation (mdlsup.c) to make it readable, and add comments.
- Add a couple dozen assertions to validate that MDL flags, state and addresses.
- Use ADDRESS_AND_SIZE_TO_SPAN_PAGES macro for nice MDL calculations.
- Set Mdl->Process only when required, and set/unset various MDL flags which were being ignored/incorrectly manipulated.
- Keep track of Process->NumberOfLockedPages during MDL lock/unlock.
- Don't return the base address of the MDL allocation when mapping locked pages - MDLs have a byte offset which was being ignored.
- Fix incorrect usage of MDLs found in the kernel (thanks to the new assertions).
- Split kernel vs. user mode MDL requests in a much more organized and optimized fashion.
- Fix a number of smaller bugs throughout the code.
svn path=/trunk/; revision=33139
- Reformat and cleanup the entire file, deprecate NtVirtualLock/Unlock which didn't really work (and aren't really required for any apps for now)
- Major perf optimizations to NtRead/VirtualMemory: Use pool memory transfer when more efficient than MDL, and use local stack buffer when size permits.
- This patch provides up to 109% improvement (more than twice as fast) in certain virtual memory operations.
- Thanks to Alex for researching this issue, and providing the internal information on the various optimizations and behaviors the NT implementation uses.
svn path=/trunk/; revision=33133
- Revert some changes from r33106:
* Set the size of szTempLCID back to CCH_LAYOUT_ID + 1, a layout ID mustn't be longer than this.
As we pass the correct size to the Registry functions as well, there can be no buffer overflow.
MAX_PATH was probably used here, because input.dll had a bug as well, so that it saved the layout ID with the wrong length.
* Use wsprintf over _stprintf
* Pass the correct value to dwBufLen (in bytes, not in TCHAR's!)
- Add back SystemParametersInfo, so that the system gets to know about the keyboard layout change.
EnumWindows is still used for setting the new keyboard layout to all existing Windows.
- Don't show a different menu for left and right clicks, that's not how most popup menus work under Windows.
Instead append all menu items from the menu template to the popup menu.
- Call SetForegroundWindow before and post a WM_NULL message after calling TrackPopupMenu, so that the popup menu will be closed, when the user clicks somewhere else
- Fix indentation
input.dll:
- Fix some incorrect lengths passed to other functions
- Get rid of some unneeded variables
- Always use the 32-bit Registry functions over the old 16-bit deprecated ones
- Fix some other stuff here and there
svn path=/trunk/; revision=33130
- load treeview classes on startup
- link to dinput8 + dxguid library
- start implementing DirectInput dialog
- use DirectInput version 8 for now
svn path=/trunk/; revision=33121
C_ASSERT is equivalent to a typedef, NOT a variable declaration
modified ntoskrnl/mm/pe.c
Convert as many ASSERTs as possible to C_ASSERT
svn path=/trunk/; revision=33117
- CDFS should enter a critical region before acquiring a resource.
- "Fix" resource assert during installation by adding some padding at the end of the VFAT FCB header -- corruption happens at pad 51.
- Once we detect corruption at pad 51, skip the FCB instead of attempting to flush it.
- Fix a serious bug in our detection of incorrect resource usage while APCs are not disabled.
- Fix a serious bug which caused shared resources not to wake up waiters when it was released, and which cause it to wake up waiters when there were still active locks held.
New ERESOURCE implementation by Aleksey (thanks to Alex for providing the information required)
- Remove ERESOURCE_XP concept, and fix the three incorrect and different definitions of the ERESOURCE structure.
- Fix the ERESOURCE implementation to use the new Vista ERESOURCE type. Two main changes:
* The count is now a 32-bit count called ActiveEntries. ActiveCount is now simply a flip-flop bit (0/1) for backward compatibility (we set to 0 when active entries is 0, and 1 when active entries is > 0)
* Instead of caching two owners, we only cache one owner, in the OwnerEntry field.
- Optimize some search algorithms slightly (just better code).
- Remove duplicated code for ExReleaseResourceLite and call ExReleaseResourceForThreadLite instead. Alex says this is ok.
svn path=/trunk/; revision=33111
- Don't keep track of the page table reference count table in the address space structure, nobody was using this.
- Instead of using either a global kernel pushlock for the kernel address space, and a per-process lock for process address space, always use a per-process lock (the kernel address space uses the idle process' lock).
- Instead of acquiring/releasing the lock by dereferencing the process which owns the address space, hold a pointer to the lock directly. This removes an extra dereference, and also allows the kernel lock to work (because kernel address space doesn't have an associated process).
- Inline the lock acquisition/release functions and the get-address-space functions.
- Measured a 20% performance boost during boot-up, and 150% during installation.
- Patch by Alex.
svn path=/trunk/; revision=33092
- fix length check in PNP_GetClassName
- allocate device id string dynamically in to avoid a potential buffer overflow
- use lstrlenW over wcslen in PnpEventThread
svn path=/trunk/; revision=33088
Bugfix : the load order, it try loading vista dxkrnl.sys frist then it try loading dxg.System
rember I have not tested vista dxkrnl.sys in reactos at all yet.
Bugfix :
thx piggworth for notice the hDev was never resive to DxEngLockHdev, it still does not do in some case.
we need more invigaste why
svn path=/trunk/; revision=33084