Commit graph

46504 commits

Author SHA1 Message Date
Amine Khaldi 0a457d3246 [CMAKE]
* Add chkstk library and link crt against it.
* Add chkstk_ms.s to libcntpr source files.

svn path=/trunk/; revision=52094
2011-06-05 18:42:09 +00:00
Amine Khaldi 30fac98374 [CMAKE]
* Fix cab creation on unix.

svn path=/trunk/; revision=52093
2011-06-05 18:00:09 +00:00
Cameron Gutman 768cc14b79 [AFD]
- Create an empty TRANSPORT_ADDRESS for the local address when doing an implicit bind so TCP/IP can choose its own local port and address instead of trying to bind the remote address and port
- Fixes another critical networking bug

svn path=/trunk/; revision=52092
2011-06-05 17:08:37 +00:00
Timo Kreuzer a0f9149ce9 [WIN32K]
Add some more debug output in case of a failed ASSERT

svn path=/trunk/; revision=52091
2011-06-05 16:00:24 +00:00
Timo Kreuzer 83aed0697f [CMAKE]
Fix build with msvc

svn path=/trunk/; revision=52090
2011-06-05 14:51:31 +00:00
Eric Kohl a9d4438b61 [MSPORTS]
Add missing definitions.

svn path=/trunk/; revision=52089
2011-06-05 13:26:43 +00:00
Kamil Hornicek 36ca51c79e fix build?
svn path=/trunk/; revision=52088
2011-06-05 12:50:02 +00:00
Eric Kohl d5f1454033 [MSPORTS]
Implement ComDBGetCurrentPortUsage.

svn path=/trunk/; revision=52087
2011-06-05 12:20:52 +00:00
Cameron Gutman b92d45b853 [IP/TCPIP]
- Add a Next member to CONNECTION_ENDPOINT to allow multiple connections to be associated with a single address file while not overwriting pointers, dereferencing other people's connection objects, and causing horrific amounts of memory corruption
- Add several sanity checks to prevent this from happening again
- Don't try dereference address files and connection endpoints in the free functions; there should be none associated since r52083 (sanity checks ensure this)
- Don't hold an extra reference to the address file when creating a listener; this reference is implicit
- This should greatly increase reliability of activities that open lots of sockets such as web browsing and running servers on ROS
- This also fixes most issues of not releasing a server port when the listener is closed

svn path=/trunk/; revision=52086
2011-06-05 02:16:45 +00:00
Eric Kohl 347ef6343f [MSPORTS]
Protect the COM database from concurrent access.

svn path=/trunk/; revision=52084
2011-06-04 21:07:28 +00:00
Cameron Gutman 588db734b0 [AFD]
- Disassociate the connection from the address file before closing them

svn path=/trunk/; revision=52083
2011-06-04 20:31:05 +00:00
Timo Kreuzer e4c98f4e8e [DDK/XDK]
Merge some changes to wdm.h back to xdk

svn path=/trunk/; revision=52080
2011-06-04 16:59:09 +00:00
Timo Kreuzer 3c54c6f84f [NTOSKRNL/DDK]
- add definition for KeMemoryBarrierWithoutFence
- add x64 version of KeMemoryBarrier and some related defines
- Use KeMemoryBarrierWithoutFence in spinlocks as suggested by Alex

svn path=/trunk/; revision=52079
2011-06-04 15:42:32 +00:00
Timo Kreuzer b19da39918 [NTOSKRNL/HAL]
- Add explicit memory barriers to KxAcquireSpinLock, KxReleaseSpinLock inline functions and KeTryToAcquireQueuedSpinLock, KeTryToAcquireQueuedSpinLockRaiseToSynch in the UP case. This will prevent the compiler from reordering memory access instructions across the boundaries of these functions, even when being inlined.
- Use the inline functions in x64 spinlock functions, too

svn path=/trunk/; revision=52078
2011-06-04 12:33:54 +00:00
Eric Kohl 6394fc44c7 [INF]
- Add an .inf file to register the unknown device class.

svn path=/trunk/; revision=52077
2011-06-04 08:03:51 +00:00
Olaf Siejka 397ee7399e [NTOSKRNL]
Hackfix to r52065:
- Comment out call to IopDecrementDeviceObjectRef in IopLoadFileSystemDriver, on Pierre's request. Needs more research. Should fix boot and testcd ASSERT in 2nd stage.

svn path=/trunk/; revision=52075
2011-06-03 13:34:29 +00:00
Gabriel Ilardi ddd9f2dc77 - Fix boot.
svn path=/trunk/; revision=52074
2011-06-03 10:58:26 +00:00
Pierre Schweitzer a0aead83b1 [NTOSKRNL]
Fixes to r52065:
- Acquire resources within a critical region
- Simplified IoEnumerateRegisteredFiltersList and made its behaviour match the one described in MSDN: http://msdn.microsoft.com/en-us/library/ff548348%28v=vs.85%29.aspx
This was brought to you by Alex Ionescu.

svn path=/trunk/; revision=52073
2011-06-03 08:43:05 +00:00
Cameron Gutman 92cd09edde - Fix build
svn path=/trunk/; revision=52070
2011-06-03 00:31:14 +00:00
Jérôme Gardou ce5b55635c [WSOCK32]
remove useless def file
rbuild : use spec file
cmake : do not use two def files, it's... pointless.

svn path=/trunk/; revision=52069
2011-06-03 00:29:36 +00:00
Cameron Gutman 45491b7e75 [FDC]
- Remove old fdc code

svn path=/trunk/; revision=52068
2011-06-03 00:20:01 +00:00
Cameron Gutman 2706c9b8b3 [NTOSKRNL]
- Fix a bug in device removal which resulted in an IRP_MN_CANCEL_REMOVE_DEVICE request not being sent if the initial IRP_MN_QUERY_REMOVE_DEVICE failed

svn path=/trunk/; revision=52066
2011-06-02 18:23:30 +00:00
Pierre Schweitzer 69764dd21a [NTOSKRNL]
- renamed Io volumes global to match Windows names (in case of debug)
- renamed IopDereferenceVpb() to IopDereferenceVpbAndFree(), IopReferenceVpbForVerify() to IopReferenceVerifyVpb(), IopInitializeVpbForMount() to IopMountInitializeVpb(), IopLoadFileSystem() to IopLoadFileSystemDriver()
- implemented IopDecrementDeviceObjectHandleCount(), IopInterlockedIncrementUlong(), IopInterlockedDecrementUlong(), IopNotifyAlreadyRegisteredFileSystems() and IoEnumerateRegisteredFiltersList()
- halfplemented IopDecrementDeviceObjectRef()
- implemented check for already registrered notification in IoRegisterFsRegistrationChange()
- implemented sending notifications for already registered drivers to registrant in IoRegisterFsRegistrationChange()
- implemented VPB freeing in IopDereferenceVpbAndFree()
- acquire Io volumes lists once and forever for system shutdown, instead of keeping acquiring and releasing
- reference device object in IopShutdownBaseFileSystems() before sending it the shutdown IRP. To ensure to keep it valid till the end
- added a FS driver registration operations counter
- use this counter to handle failed mounts
- fixed: release locks before calling driver for mounting and reacquire them after
- fixed check for boot partition failure (and associated bugcheck): check we are in boot phase 0 or 1
- simplified lock process by using only one lock (ie removed mutex). Also use only critical region where needed
- fixed: ensure that locks are properly released when quitting a function
- fixed wrong return in IopCreateVpb()
- minor fixes around

svn path=/trunk/; revision=52065
2011-06-02 17:43:44 +00:00
Rafal Harabien 33a2b85a57 [NTOSKRNL]
- Reset KdbNumberOfRowsPrinted and KdbNumberOfColsPrinted before reading new command in kernel debugger so if previous command printed nearly full page, new command won't show "Press q to abort" message before processing

svn path=/trunk/; revision=52064
2011-06-02 15:59:57 +00:00
Eric Kohl 12f49ac10e [SETUPAPI]
Add missing properties for SetupDiGetDeviceRegistryProperty and SetupDiSetDeviceRegistryProperty.

svn path=/trunk/; revision=52062
2011-06-02 14:42:15 +00:00
Jérôme Gardou 37d0db0c59 [CMAKE]
"According to gcc doc, if header.h is precompiled, the output should be named "header.h.gch" and not anything else."
Knowing it was the first step before actually doing it :-/

svn path=/trunk/; revision=52061
2011-06-02 12:55:09 +00:00
Jérôme Gardou cf2494a35b revert unwanted change
svn path=/trunk/; revision=52060
2011-06-02 12:29:11 +00:00
Jérôme Gardou 43ff81bdb0 [CMAKE]
no need to call target_link_libraries if there is nothing to link

svn path=/trunk/; revision=52059
2011-06-02 12:20:30 +00:00
Jérôme Gardou 989c121257 [CMAKE]
fix pch support, with proper dependancies.
  Use cmake built-in functions instead of doing weird "magic" with tabs and spaces.
  According to gcc doc, if header.h is precompiled, the output should be named "header.h.gch" and not anything else.

svn path=/trunk/; revision=52058
2011-06-02 12:18:22 +00:00
Amine Khaldi f835168ac7 [CMAKE]
* I left setting CMAKE_AR out of the condition. Fix this.

svn path=/trunk/; revision=52056
2011-06-02 10:54:56 +00:00
Cameron Gutman 36bc23ba03 [FDC]
- Implement fdc.sys (still needs work but fairly complete)
[TXTSETUP.SIF]
- Load fdc.sys for floppy controllers
[FDC.INF]
- Install fdc.sys for floppy controllers

svn path=/trunk/; revision=52055
2011-06-02 06:24:25 +00:00
Cameron Gutman 3ad1745d96 [NTOSKRNL]
- Comment out sending remove to devices before driver installation because there are still some bugs causing crashes

svn path=/trunk/; revision=52054
2011-06-02 06:07:08 +00:00
Amine Khaldi 316a7467b0 [CMAKE]
Merge r52051 and r52052 from cmake branch:
* Improve static libs creation in *nix. Dedicated to arty.
* Add a missing dependency.

svn path=/trunk/; revision=52053
2011-06-01 22:18:48 +00:00
Timo Kreuzer 295bc5ef26 [NTOSKRNL]
Merge r52027 from cmake branch:
* Several improvements to debug symbols handling.
* A new (killer/awesome/...etc) feature has been introduced to kdbg: argument values support. Now backtraces contain not only usermode and kernelmode addresses translated, but also the argument values passed to the functions along the trace.
* Brought to you by the Arty.
* works only with cmake builds

svn path=/trunk/; revision=52050
2011-06-01 20:36:40 +00:00
Jérôme Gardou 2489556d2b [CMAKE]
- clean up wine directx build file.
Wine removed COM from wind3d

svn path=/trunk/; revision=52049
2011-06-01 19:45:03 +00:00
Cameron Gutman f31e1602a7 [UMPNPMGR]
- Handle more GUIDs

svn path=/trunk/; revision=52048
2011-06-01 19:44:03 +00:00
Timo Kreuzer 7c988c53c5 [CMD]
replace FILE IO with Memory IO functions for batch files
Patch by HansH (hans at atbas dot org)

See issue #5807 for more details.

svn path=/trunk/; revision=52047
2011-06-01 19:33:20 +00:00
Cameron Gutman 73f8eda071 [NTOSKRNL]
- Massive rework of device removal
- IRP_MN_QUERY_REMOVE_DEVICE is sent to all devices that will be removed in response to a removal/ejection
- If any of the IRP_MN_QUERY_REMOVE_DEVICE requests fail, all devices which received a IRP_MN_QUERY_REMOVE_DEVICE will receive IRP_MN_CANCEL_REMOVE_DEVICE
- If everything approves the remove request, IRP_MN_REMOVE_DEVICE will be sent to children, ejection and/or removal relations, and finally the device itself
- Handle removal relations for all devices not just 1st level devices
- Remove child devices before removing the parent
- Move GUID_DEVICE_REMOVE_PENDING and GUID_DEVICE_REMOVAL_VETOED notifications to IopQueryRemoveDevice
- Implement IopCancelRemoveDevice which sends IRP_MN_CANCEL_REMOVE_DEVICE to the driver stack and sends GUID_TARGET_DEVICE_REMOVE_CANCELLED to any drivers waiting on target device change
- Use the IopRemoveDevice function to remove devices instead of calling IopQueryRemoveDevice and IopSendRemoveDevice manually so removal and/or ejection relations and children are processed
- IRPs and PnP notifications sent upon device removal (surprise and safe) should now be compatible with XP/Vista/7

svn path=/trunk/; revision=52046
2011-06-01 19:32:12 +00:00
Rafal Harabien 77760f12f6 [APITESTS]
- Add more Rectangle function tests
- Improve ScrollDC tests

svn path=/trunk/; revision=52045
2011-06-01 18:20:51 +00:00
Rafal Harabien d159b215ee [NTOSKRNL]
- Bugcheck if ExFreePoolWithTag is called with wrong tag

svn path=/trunk/; revision=52044
2011-06-01 18:16:52 +00:00
Rafal Harabien 2861515d78 [NTOSKRNL]
- Use tags when allocation and freeing memory and define them in tag.h
- Fix some wrongly used tags when freeing
- Our new memory manager doesn't check tags when ExFreePoolWithTag is used. It will be fixed after testing

svn path=/trunk/; revision=52043
2011-06-01 13:39:36 +00:00
Rafal Harabien c2e7b8b976 [NTOSKRNL]
- Acquire spinlock when accessing SymbolFileListHead

svn path=/trunk/; revision=52041
2011-06-01 13:16:49 +00:00
Timo Kreuzer 29a7aa1288 [CRT]
in _flsbuf, always reset _cnt to 0 and don't allocate/use a buffer when _IONBUF is set. Fixes a regression in msvcrt_winetest file.

See issue #5829 for more details.

svn path=/trunk/; revision=52040
2011-06-01 12:08:02 +00:00
Johannes Anderwald 80f8e1b66c [NTOS]
- Fix bug in PnpRegSzToString. The caller expects the result length to be the length of the string in bytes, not the string length
- Introduced in rev 46690

svn path=/trunk/; revision=52037
2011-06-01 09:59:54 +00:00
Cameron Gutman 9048ea9dcf [NTOSKRNL]
- Remove the device node when the device object is destroyed to prevent PnP manager from crashing when manipulating device nodes with device objects that no longer exist
- Move removal notifications into IopRemoveDevice and call it from IopPrepareDeviceForRemoval and IoRequestDeviceEject to manage all of the removal relations for each device removed

svn path=/trunk/; revision=52034
2011-06-01 06:22:54 +00:00
Cameron Gutman 47328a7510 [NTOSKRNL]
- Fix a bug in device removal and ejection which caused the request to fail when EjectionRelations or RemovalRelations was not handled by a driver in the stack

svn path=/trunk/; revision=52033
2011-06-01 01:06:35 +00:00
Rafal Harabien f1ad369297 [INF]
- Really add disk.inf. Forgotten in r51978

svn path=/trunk/; revision=52032
2011-05-31 23:19:07 +00:00
Cameron Gutman b22890ae01 [NTOSKRNL]
- Remove an extra semicolon
- Dedicated to encoded

svn path=/trunk/; revision=52031
2011-05-31 23:04:59 +00:00
Rafal Harabien eac5ee241d [CMAKE]
- sys-stubs.S depends now on w32ksvc.h. Unfortunately CMake isn't smart enough to find it automatically

svn path=/trunk/; revision=52030
2011-05-31 21:05:03 +00:00
Cameron Gutman 80d7517cde [NTOSKRNL]
- Implement IopRemoveDevice and IopStopDevice
- Do a graceful remove before installing new drivers (like Windows does)
- Debug log warnings abound (don't be alarmed ;)) because drivers aren't used to receiving IRP_MN_QUERY_REMOVE_DEVICE, IRP_MN_REMOVE_DEVICE and IRP_MN_QUERY_PNP_DEVICE_STATE from our (formly) crippled PnP manager

svn path=/trunk/; revision=52029
2011-05-31 19:34:08 +00:00