Commit w3seek patch from bug 1609 : file attachment (id=910)
The attached patch implements QueueUserWorkItem()/RtlQueueWorkItem() (lacks
optimizations!!!). WINE's latest rpcrt4 relies on it.
1. Implement QueueUserWorkItem()/RtlQueueWorkItem() :
2. A slightly optimized
3. Supports WT_TRANSFER_IMPERSONATION
4. Slightly improved handling of growing/shrinking the pool by assuming work items with WT_EXECUTELONGFUNCTION run longer
5. Fixes a hack that made a worker thread always terminate if there were at least one more thread available
svn path=/trunk/; revision=22805
Commit w3seek patch from bug 1609 : file attachment (id=910)
The attached patch implements QueueUserWorkItem()/RtlQueueWorkItem() (lacks
optimizations!!!). WINE's latest rpcrt4 relies on it.
1. Implement QueueUserWorkItem()/RtlQueueWorkItem() :
2. A slightly optimized
3. Supports WT_TRANSFER_IMPERSONATION
4. Slightly improved handling of growing/shrinking the pool by assuming work items with WT_EXECUTELONGFUNCTION run longer
5. Fixes a hack that made a worker thread always terminate if there were at least one more thread available
svn path=/trunk/; revision=22804
- Add support for WS_EX_MDICHILD. Reordered sequence for setting WindowObject and callers styles.
- Synced mdi.c from Wine. Added support function MDI_GetId help return IDMenu.
- Thanks to GreatLord for helping.
svn path=/trunk/; revision=22792
- Setup a buffer/MDL and the correct IRP flags so that that I/O manager can handle allocation, copy, free for us.
- Setup the search pattern as an auxiliary buffer so that the I/O Mgr can track that one for us as well.
- Update to use the correct sync semantics/routines.
- Use deferred I/O completion.
- Outline TODOs and workplan for iofunc.c
svn path=/trunk/; revision=22791
- Allow async i/o access on mailslots, without a byte offset.
- Fix sync semantics just like for the other functions until now.
- Fix a potential object leak in a failure case.
- Don't call IoBuildSyncronousFsdRequest since we want to build the IRP ourselves.
- Use deferred I/O as an optimization.
svn path=/trunk/; revision=22790
- Allow async i/o access on mailslots, without a byte offset.
- Fix sync semantics just like for the other functions until now.
- Fix a potential object leak in a failure case.
- Don't call IoBuildSyncronousFsdRequest since we want to build the IRP ourselves.
- Use deferred I/O as an optimization.
svn path=/trunk/; revision=22789
- Add proper sync operation.
- Set the APC Routine/Context in the IRP instead of ignoring them.
- Dereference the event on failure.
- Set the allocated buffer as AuxiliaryBuffer so the I/O manager fres it.
svn path=/trunk/; revision=22775
- Create IopFinalizeAsynchronousIo to deal with Sync APIs working on Async file objects, which need to be waited on differently and have the IOSB copied manually.
- Update NtFlushBuffersFile to new semantics (ie, usage of the new implemented functions).
svn path=/trunk/; revision=22772
- Fix them to lock the fileobject for synch operations, use IopCleanupFailedIrp, queue the IRP in the thread's list, support aborting the I/o operation through IopAbortInterruptedIrp, and properly wait for comlpetion.
svn path=/trunk/; revision=22770
- Created our new friends: IopCleanupFailedIrp, IopAbortInterruptedIrp, IopPerformSynchronousRequest, IopLockFileObject, IopUnlockFileObject, IopQueueIrpToThread, IopUpdateOperationCount.
- What does this mean: We actually queue IRPs to their thread! We actually respect I/O transfers being interrupted/alerted! We actually respect I/O operation counts! We actually LOCK FILE OBJECTS instead of randomly using them! We now support Deferred (read: MUCH faster) I/O completion.
- First function blessed: IopDeviceFsIoControl.
- Also simplified access rights check and fixedup some formatting.
svn path=/trunk/; revision=22769
- Also use FsRtlIsTotalDeviceFailure to check if the error was a fatal device error (like a CRC error) and abandon mounting in this case as well.
svn path=/trunk/; revision=22765
- Fix a bug which was causing us to incorrectly unlock the device if it was already locked by the caller isntead of by IopMountVolume.
- When loading the file system, make sure to unlock the device object if we had locked it in IopMountVolume, as well as to re-lock it afterwards. Also handle a potential race condition due to this unloacking, in which the VPB might've become mounted behind our back, and simply return success if this happened.
svn path=/trunk/; revision=22764
- Dereference the device object in case of failure.
- Add some optimizations to quickly skip invalid raw mounting.
- Add support for VPB_RAW_MOUNT.
- Allow raw mount if this is the only device on the list.
- Make the success case go through shared exit, otherwise the device wasn't getting unlocked previously.
svn path=/trunk/; revision=22763
- Reference the device object being mounted.
- If the file system being mounted is an atachee, find its base device object too, and increase the IRP Stack for each attached FSD.
- Fix IRP parameters with this new information.
svn path=/trunk/; revision=22762
- Set the right IRP flags for a mount operation.
- Don't ignore AllowRawMount flag.
- Don't waste time passing or clearing unused flags/data on the IRP/Io Stack.
svn path=/trunk/; revision=22761
- Don't mount if the VPB is alread ymoutned or being removed
- Bugcheck the system if we failed to mount the boot partition.
svn path=/trunk/; revision=22760
- Optimize by using directly the device queue instead of allocating a structure for each FS registered.
- Hack IopMountVolume to manage this new model. Improved version coming in next patch to deal with some bugs.
svn path=/trunk/; revision=22758
- Each new change request should be queued at the end of the list, not at the head.
- Also, reference the device object for each registration, since one more object is holding a pointer to it, likewise, dereference the object on deregistration.
- IopLoadFileSystem should use the base FSD in case the device object is an attachee. Also, use IoBuildDEviceIoControlRequest to minimize the IRP setup to only a couple of lines.
svn path=/trunk/; revision=22757
- IoVerifyVolume:
- Send the IRP to the base FSD, in case the current FSD is an attachee
- Set correct flags in the IRP to notify that this is a mount operation using PAGING I/O semantics.
- Don't ignore AllowRawMount parameter.
- We want to mount the File System on *FAILURE*, not on SUCCESS!
- Add reference/dereferencing to the VPB.
svn path=/trunk/; revision=22756