2 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=22805
This commit is contained in:
Magnus Olsen 2006-07-03 20:23:48 +00:00
parent d2bab053ae
commit f9fa435673
2 changed files with 20 additions and 0 deletions

View file

@ -1932,6 +1932,18 @@ RtlSetProcessIsCritical(
#define NtCurrentPeb() (NtCurrentTeb()->ProcessEnvironmentBlock)
//
// Thread Pool Functions
//
NTSYSAPI
NTSTATUS
NTAPI
RtlQueueWorkItem(
IN WORKERCALLBACKFUNC Function,
IN PVOID Context OPTIONAL,
IN ULONG Flags);
//
// Environment/Path Functions
//

View file

@ -666,6 +666,7 @@ typedef enum
#define LANG_ESTONIAN 0x25
#define LANG_LATVIAN 0x26
#define LANG_LITHUANIAN 0x27
#define LANG_TAJIK 0x28
#define LANG_FARSI 0x29
#define LANG_VIETNAMESE 0x2a
#define LANG_ARMENIAN 0x2b
@ -804,6 +805,7 @@ typedef enum
#define SUBLANG_SPANISH_PUERTO_RICO 0x14
#define SUBLANG_SWEDISH 0x01
#define SUBLANG_SWEDISH_FINLAND 0x02
#define SUBLANG_TAJIK_TAJIKISTAN 0x01
#define SUBLANG_THAI_THAILAND 0x1
#define SUBLANG_URDU_PAKISTAN 0x01
#define SUBLANG_URDU_INDIA 0x02
@ -1071,6 +1073,8 @@ typedef enum
#define IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG 10
#define IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT 11
#define IMAGE_DIRECTORY_ENTRY_IAT 12
#define IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT 13
#define IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR 14
#define IMAGE_SCN_TYPE_REG 0
#define IMAGE_SCN_TYPE_DSECT 1
#define IMAGE_SCN_TYPE_NOLOAD 2
@ -1482,12 +1486,16 @@ typedef enum
#define VER_SUITE_BLADE 1024
#define WT_EXECUTEDEFAULT 0x00000000
#define WT_EXECUTEINIOTHREAD 0x00000001
#define WT_EXECUTEINUITHREAD 0x00000002
#define WT_EXECUTEINWAITTHREAD 0x00000004
#define WT_EXECUTEONLYONCE 0x00000008
#define WT_EXECUTELONGFUNCTION 0x00000010
#define WT_EXECUTEINTIMERTHREAD 0x00000020
#define WT_EXECUTEINPERSISTENTIOTHREAD 0x00000040
#define WT_EXECUTEINPERSISTENTTHREAD 0x00000080
#define WT_TRANSFER_IMPERSONATION 0x00000100
#define WT_SET_MAX_THREADPOOL_THREADS(flags,limit) ((flags)|=(limit)<<16)
typedef VOID (NTAPI *WORKERCALLBACKFUNC)(PVOID);
#if (_WIN32_WINNT >= 0x0501)
#define ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION 1
#define ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION 2