Author: dgorbachev
Date: Mon Oct 5 16:13:01 2009
New Revision: 43301
URL: http://svn.reactos.org/svn/reactos?rev=43301&view=rev
Log:
Document ROS_GENERATE_RSYM environment variable.
Modified:
trunk/reactos/Makefile
Modified: trunk/reactos/Makefile
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/Makefile?rev=43301&r1=4330…
==============================================================================
--- trunk/reactos/Makefile [iso-8859-1] (original)
+++ trunk/reactos/Makefile [iso-8859-1] Mon Oct 5 16:13:01 2009
@@ -111,6 +111,10 @@
# data added by GCC/LD as well as of RSYM symbol data. Output binary size
# will go from 80 to 40MB, memory usage from 58 to 38MB and the install CD
# from 18 to 13MB. The variable defaults to no.
+#
+# ROS_GENERATE_RSYM
+# This variable controls generation of RSYM symbol data. The value can be
+# either yes (to generate symbol data) or no. The variable defaults to yes.
#
# ROS_RBUILDFLAGS
# Pass parameters to rbuild.
Author: cgutman
Date: Mon Oct 5 03:44:17 2009
New Revision: 43296
URL: http://svn.reactos.org/svn/reactos?rev=43296&view=rev
Log:
- Cancel pending user IRPs when we get a IRP_MJ_CLEANUP request
- Previously there was some confusion between IRPs in PendingIrpList and InFlightRequest, InFlightRequest IRPs go from AFD to a TDI transport driver (tcpip) which are sent on behalf of AFD and are cancelled upon socket destruction (IRP_MJ_CLOSE) vs. IRPs in the PendingIrpList which go from user-mode to AFD which are sent of behalf of the user and should be cancelled when handling IRP_MJ_CLEANUP
Modified:
trunk/reactos/drivers/network/afd/afd/main.c
Modified: trunk/reactos/drivers/network/afd/afd/main.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/ma…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/main.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/main.c [iso-8859-1] Mon Oct 5 03:44:17 2009
@@ -172,6 +172,38 @@
}
static NTSTATUS NTAPI
+AfdCleanupSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp,
+ PIO_STACK_LOCATION IrpSp)
+{
+ PFILE_OBJECT FileObject = IrpSp->FileObject;
+ PAFD_FCB FCB = FileObject->FsContext;
+ PLIST_ENTRY CurrentEntry, NextEntry;
+ UINT Function;
+ PIRP CurrentIrp;
+
+ if( !SocketAcquireStateLock( FCB ) ) return LostSocket(Irp);
+
+ for (Function = 0; Function < MAX_FUNCTIONS; Function++)
+ {
+ CurrentEntry = FCB->PendingIrpList[Function].Flink;
+ while (CurrentEntry != &FCB->PendingIrpList[Function])
+ {
+ NextEntry = CurrentEntry->Flink;
+ CurrentIrp = CONTAINING_RECORD(CurrentEntry, IRP, Tail.Overlay.ListEntry);
+
+ /* The cancel routine will remove the IRP from the list */
+ IoCancelIrp(CurrentIrp);
+
+ CurrentEntry = NextEntry;
+ }
+ }
+
+ KillSelectsForFCB( FCB->DeviceExt, FileObject, FALSE );
+
+ return UnlockAndMaybeComplete(FCB, STATUS_SUCCESS, Irp, 0);
+}
+
+static NTSTATUS NTAPI
AfdCloseSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp,
PIO_STACK_LOCATION IrpSp)
{
@@ -346,6 +378,9 @@
case IRP_MJ_CLOSE:
/* Ditto the borrowing */
return AfdCloseSocket(DeviceObject, Irp, IrpSp);
+
+ case IRP_MJ_CLEANUP:
+ return AfdCleanupSocket(DeviceObject, Irp, IrpSp);
/* write data */
case IRP_MJ_WRITE:
@@ -626,6 +661,7 @@
/* register driver routines */
DriverObject->MajorFunction[IRP_MJ_CLOSE] = AfdDispatch;
DriverObject->MajorFunction[IRP_MJ_CREATE] = AfdDispatch;
+ DriverObject->MajorFunction[IRP_MJ_CLEANUP] = AfdDispatch;
DriverObject->MajorFunction[IRP_MJ_WRITE] = AfdDispatch;
DriverObject->MajorFunction[IRP_MJ_READ] = AfdDispatch;
DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = AfdDispatch;