mirror of
https://github.com/reactos/reactos.git
synced 2025-01-10 08:10:18 +00:00
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 svn path=/trunk/; revision=22804
This commit is contained in:
parent
abedc7b76b
commit
d2bab053ae
1 changed files with 14 additions and 1 deletions
|
@ -93,7 +93,7 @@ static const struct
|
|||
{TRUE, 0}, // ThreadIdealProcessor
|
||||
{FALSE, 0}, // ThreadPriorityBoost
|
||||
{TRUE, 0}, // ThreadSetTlsArrayAddress
|
||||
{FALSE, 0}, // ThreadIsIoPending
|
||||
{TRUE, sizeof(ULONG)}, // ThreadIsIoPending
|
||||
{TRUE, 0} // ThreadHideFromDebugger
|
||||
};
|
||||
|
||||
|
@ -1191,6 +1191,7 @@ NtQueryInformationThread (IN HANDLE ThreadHandle,
|
|||
PVOID Address;
|
||||
LARGE_INTEGER Count;
|
||||
BOOLEAN Last;
|
||||
ULONG IsIoPending;
|
||||
}u;
|
||||
KPROCESSOR_MODE PreviousMode;
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
|
@ -1292,6 +1293,18 @@ NtQueryInformationThread (IN HANDLE ThreadHandle,
|
|||
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);
|
||||
|
|
Loading…
Reference in a new issue