[ros-diffs] [greatlrd] 22804: 1 of 4 commit (sorry my svn clinet is crazy for moment) 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

greatlrd at svn.reactos.org greatlrd at svn.reactos.org
Mon Jul 3 22:23:11 CEST 2006


Author: greatlrd
Date: Tue Jul  4 00:23:10 2006
New Revision: 22804

URL: http://svn.reactos.org/svn/reactos?rev=22804&view=rev
Log:
1 of 4 commit (sorry my svn clinet is crazy for moment)
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




Modified:
    trunk/reactos/ntoskrnl/ps/query.c

Modified: trunk/reactos/ntoskrnl/ps/query.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/query.c?rev=22804&r1=22803&r2=22804&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/ps/query.c (original)
+++ trunk/reactos/ntoskrnl/ps/query.c Tue Jul  4 00:23:10 2006
@@ -93,7 +93,7 @@
     {TRUE, 0},					// ThreadIdealProcessor
     {FALSE, 0},					// ThreadPriorityBoost
     {TRUE, 0},					// ThreadSetTlsArrayAddress
-    {FALSE, 0},					// ThreadIsIoPending
+    {TRUE, sizeof(ULONG)},		// ThreadIsIoPending
     {TRUE, 0}					// ThreadHideFromDebugger
 };
 
@@ -1191,6 +1191,7 @@
       PVOID Address;
       LARGE_INTEGER Count;
       BOOLEAN Last;
+      ULONG IsIoPending;
    }u;
    KPROCESSOR_MODE PreviousMode;
    NTSTATUS Status = STATUS_SUCCESS;
@@ -1292,6 +1293,18 @@
 	     u.Last = FALSE;
 	   }
          break;
+
+       case ThreadIsIoPending:
+       {
+           KIRQL OldIrql;
+
+           /* Raise the IRQL to protect the IRP list */
+           KeRaiseIrql(APC_LEVEL, &OldIrql);
+           u.IsIoPending = !IsListEmpty(&Thread->IrpList);
+           KeLowerIrql(OldIrql);
+           break;
+       }
+
        default:
 	 /* Shoult never occure if the data table is correct */
 	 KEBUGCHECK(0);




More information about the Ros-diffs mailing list