Author: tkreuzer
Date: Mon Aug 25 11:38:02 2008
New Revision: 35631
URL:
http://svn.reactos.org/svn/reactos?rev=35631&view=rev
Log:
merge 35359 from ros-amd64-bringup branch:
The TEB member is called ClientId not Cid on all Windows versions I could check (XP, 2k3,
vista).
Modified:
trunk/reactos/dll/ntdll/csr/api.c
trunk/reactos/dll/ntdll/csr/connect.c
trunk/reactos/dll/win32/gdi32/main/dllmain.c
trunk/reactos/dll/win32/kernel32/file/pipe.c
trunk/reactos/dll/win32/kernel32/process/proc.c
trunk/reactos/dll/win32/kernel32/thread/thread.c
trunk/reactos/dll/win32/user32/windows/window.c
trunk/reactos/include/ndk/pstypes.h
trunk/reactos/lib/rtl/critical.c
trunk/reactos/lib/rtl/dbgbuffer.c
trunk/reactos/lib/rtl/resource.c
trunk/reactos/ntoskrnl/mm/procsup.c
trunk/reactos/subsystems/win32/win32k/ntuser/event.c
Modified: trunk/reactos/dll/ntdll/csr/api.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/csr/api.c?rev=35…
==============================================================================
--- trunk/reactos/dll/ntdll/csr/api.c [iso-8859-1] (original)
+++ trunk/reactos/dll/ntdll/csr/api.c [iso-8859-1] Mon Aug 25 11:38:02 2008
@@ -73,7 +73,7 @@
/* Set up the data for CSR */
DbgBreakPoint();
IdentifyAlertableThread = &ApiMessage.IdentifyAlertableThread;
- IdentifyAlertableThread->Cid = NtCurrentTeb()->Cid;
+ IdentifyAlertableThread->Cid = NtCurrentTeb()->ClientId;
/* Call it */
Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage,
Modified: trunk/reactos/dll/ntdll/csr/connect.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/csr/connect.c?re…
==============================================================================
--- trunk/reactos/dll/ntdll/csr/connect.c [iso-8859-1] (original)
+++ trunk/reactos/dll/ntdll/csr/connect.c [iso-8859-1] Mon Aug 25 11:38:02 2008
@@ -152,7 +152,7 @@
{
/* This is a server-to-server call. Save our CID and do a direct call */
DbgBreakPoint();
- ApiMessage->Header.ClientId = NtCurrentTeb()->Cid;
+ ApiMessage->Header.ClientId = NtCurrentTeb()->ClientId;
Status = CsrServerApiRoutine(&ApiMessage->Header,
&ApiMessage->Header);
Modified: trunk/reactos/dll/win32/gdi32/main/dllmain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/main/dllma…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/main/dllmain.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/gdi32/main/dllmain.c [iso-8859-1] Mon Aug 25 11:38:02 2008
@@ -48,7 +48,7 @@
GdiHandleTable =
NtCurrentTeb()->ProcessEnvironmentBlock->GdiSharedHandleTable;
GdiSharedHandleTable =
NtCurrentTeb()->ProcessEnvironmentBlock->GdiSharedHandleTable;
GdiDevCaps = &GdiSharedHandleTable->DevCaps;
- CurrentProcessId = NtCurrentTeb()->Cid.UniqueProcess;
+ CurrentProcessId = NtCurrentTeb()->ClientId.UniqueProcess;
GDI_BatchLimit = (DWORD)
NtCurrentTeb()->ProcessEnvironmentBlock->GdiDCAttributeList;
GdiHandleCache =
(PGDIHANDLECACHE)NtCurrentTeb()->ProcessEnvironmentBlock->GdiHandleBuffer;
}
Modified: trunk/reactos/dll/win32/kernel32/file/pipe.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/pi…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/file/pipe.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/file/pipe.c [iso-8859-1] Mon Aug 25 11:38:02 2008
@@ -55,7 +55,7 @@
/* Create the pipe name */
swprintf(Buffer,
L"\\Device\\NamedPipe\\Win32Pipes.%08x.%08x",
- NtCurrentTeb()->Cid.UniqueProcess,
+ NtCurrentTeb()->ClientId.UniqueProcess,
PipeId);
RtlInitUnicodeString(&PipeName, Buffer);
Modified: trunk/reactos/dll/win32/kernel32/process/proc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/process…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/process/proc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/process/proc.c [iso-8859-1] Mon Aug 25 11:38:02 2008
@@ -272,7 +272,7 @@
DWORD STDCALL
GetCurrentProcessId(VOID)
{
- return((DWORD)GetTeb()->Cid.UniqueProcess);
+ return((DWORD)GetTeb()->ClientId.UniqueProcess);
}
Modified: trunk/reactos/dll/win32/kernel32/thread/thread.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/thread/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/thread/thread.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/thread/thread.c [iso-8859-1] Mon Aug 25 11:38:02
2008
@@ -319,7 +319,7 @@
WINAPI
GetCurrentThreadId(VOID)
{
- return (DWORD)(NtCurrentTeb()->Cid).UniqueThread;
+ return (DWORD)(NtCurrentTeb()->ClientId).UniqueThread;
}
/*
Modified: trunk/reactos/dll/win32/user32/windows/window.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/w…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/window.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/window.c [iso-8859-1] Mon Aug 25 11:38:02 2008
@@ -1313,8 +1313,8 @@
{ // We are current.
//FIXME("Current!\n");
if ( lpdwProcessId )
- *lpdwProcessId = (DWORD)NtCurrentTeb()->Cid.UniqueProcess;
- Ret = (DWORD)NtCurrentTeb()->Cid.UniqueThread;
+ *lpdwProcessId = (DWORD)NtCurrentTeb()->ClientId.UniqueProcess;
+ Ret = (DWORD)NtCurrentTeb()->ClientId.UniqueThread;
}
else
{ // Ask kernel for info.
Modified: trunk/reactos/include/ndk/pstypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/pstypes.h?rev=…
==============================================================================
--- trunk/reactos/include/ndk/pstypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/pstypes.h [iso-8859-1] Mon Aug 25 11:38:02 2008
@@ -729,7 +729,7 @@
{
NT_TIB Tib;
PVOID EnvironmentPointer;
- CLIENT_ID Cid;
+ CLIENT_ID ClientId;
PVOID ActiveRpcHandle;
PVOID ThreadLocalStoragePointer;
struct _PEB *ProcessEnvironmentBlock;
Modified: trunk/reactos/lib/rtl/critical.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/critical.c?rev=356…
==============================================================================
--- trunk/reactos/lib/rtl/critical.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/critical.c [iso-8859-1] Mon Aug 25 11:38:02 2008
@@ -310,7 +310,7 @@
DPRINT("Freeing from Buffer: %p. Entry: %lu inside Process: %p\n",
DebugInfo,
EntryId,
- NtCurrentTeb()->Cid.UniqueProcess);
+ NtCurrentTeb()->ClientId.UniqueProcess);
RtlpDebugInfoFreeList[EntryId] = FALSE;
} else {
@@ -318,7 +318,7 @@
/* It's a dynamic one, so free from the heap */
DPRINT("Freeing from Heap: %p inside Process: %p\n",
DebugInfo,
- NtCurrentTeb()->Cid.UniqueProcess);
+ NtCurrentTeb()->ClientId.UniqueProcess);
RtlFreeHeap(NtCurrentPeb()->ProcessHeap, 0, DebugInfo);
}
@@ -424,7 +424,7 @@
NTAPI
RtlEnterCriticalSection(PRTL_CRITICAL_SECTION CriticalSection)
{
- HANDLE Thread = (HANDLE)NtCurrentTeb()->Cid.UniqueThread;
+ HANDLE Thread = (HANDLE)NtCurrentTeb()->ClientId.UniqueThread;
/* Try to Lock it */
if (_InterlockedIncrement(&CriticalSection->LockCount) != 0) {
@@ -522,7 +522,7 @@
CritcalSectionDebugData = RtlpAllocateDebugInfo();
DPRINT("Allocated Debug Data: %p inside Process: %p\n",
CritcalSectionDebugData,
- NtCurrentTeb()->Cid.UniqueProcess);
+ NtCurrentTeb()->ClientId.UniqueProcess);
if (!CritcalSectionDebugData) {
@@ -657,11 +657,11 @@
-1) == -1) {
/* It's ours */
- CriticalSection->OwningThread = NtCurrentTeb()->Cid.UniqueThread;
+ CriticalSection->OwningThread = NtCurrentTeb()->ClientId.UniqueThread;
CriticalSection->RecursionCount = 1;
return TRUE;
- } else if (CriticalSection->OwningThread == NtCurrentTeb()->Cid.UniqueThread) {
+ } else if (CriticalSection->OwningThread ==
NtCurrentTeb()->ClientId.UniqueThread) {
/* It's already ours */
_InterlockedIncrement(&CriticalSection->LockCount);
Modified: trunk/reactos/lib/rtl/dbgbuffer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/dbgbuffer.c?rev=35…
==============================================================================
--- trunk/reactos/lib/rtl/dbgbuffer.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/dbgbuffer.c [iso-8859-1] Mon Aug 25 11:38:02 2008
@@ -234,7 +234,7 @@
IN OUT PRTL_DEBUG_INFORMATION Buf)
{
NTSTATUS Status = STATUS_SUCCESS;
- ULONG Pid = (ULONG) NtCurrentTeb()->Cid.UniqueProcess;
+ ULONG Pid = (ULONG) NtCurrentTeb()->ClientId.UniqueProcess;
Buf->Flags = DebugInfoMask;
Buf->OffsetFree = sizeof(RTL_DEBUG_INFORMATION);
Modified: trunk/reactos/lib/rtl/resource.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/resource.c?rev=356…
==============================================================================
--- trunk/reactos/lib/rtl/resource.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/resource.c [iso-8859-1] Mon Aug 25 11:38:02 2008
@@ -94,7 +94,7 @@
}
else if (Resource->NumberActive < 0) /* exclusive lock in progress */
{
- if (Resource->OwningThread == NtCurrentTeb()->Cid.UniqueThread)
+ if (Resource->OwningThread == NtCurrentTeb()->ClientId.UniqueThread)
{
retVal = TRUE;
Resource->NumberActive--;
@@ -120,7 +120,7 @@
goto wait;
}
if (retVal == TRUE)
- Resource->OwningThread = NtCurrentTeb()->Cid.UniqueThread;
+ Resource->OwningThread = NtCurrentTeb()->ClientId.UniqueThread;
done:
RtlLeaveCriticalSection(&Resource->Lock);
return retVal;
@@ -141,7 +141,7 @@
RtlEnterCriticalSection(&Resource->Lock);
if (Resource->NumberActive < 0)
{
- if (Resource->OwningThread == NtCurrentTeb()->Cid.UniqueThread)
+ if (Resource->OwningThread == NtCurrentTeb()->ClientId.UniqueThread)
{
Resource->NumberActive--;
retVal = TRUE;
@@ -218,7 +218,7 @@
if (Resource->NumberActive == 1)
{
- Resource->OwningThread = NtCurrentTeb()->Cid.UniqueThread;
+ Resource->OwningThread = NtCurrentTeb()->ClientId.UniqueThread;
Resource->NumberActive = -1;
}
else
@@ -233,7 +233,7 @@
return;
RtlEnterCriticalSection(&Resource->Lock);
- Resource->OwningThread = NtCurrentTeb()->Cid.UniqueThread;
+ Resource->OwningThread = NtCurrentTeb()->ClientId.UniqueThread;
Resource->NumberActive = -1;
}
RtlLeaveCriticalSection(&Resource->Lock);
Modified: trunk/reactos/ntoskrnl/mm/procsup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/procsup.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/procsup.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/procsup.c [iso-8859-1] Mon Aug 25 11:38:02 2008
@@ -452,7 +452,7 @@
Teb->Tib.Self = (PNT_TIB)Teb;
/* Set TEB Data */
- Teb->Cid = *ClientId;
+ Teb->ClientId = *ClientId;
Teb->RealClientId = *ClientId;
Teb->ProcessEnvironmentBlock = Process->Peb;
Teb->CurrentLocale = PsDefaultThreadLocaleId;
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/event.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/event.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/event.c [iso-8859-1] Mon Aug 25 11:38:02
2008
@@ -155,7 +155,7 @@
hwnd,
pEP->idObject,
pEP->idChild,
- (DWORD)(NtCurrentTeb()->Cid).UniqueThread,
+ (DWORD)(NtCurrentTeb()->ClientId).UniqueThread,
(DWORD)EngGetTickCount(),
pEH->Proc);
return Result;
@@ -185,14 +185,14 @@
if ((pEH->Thread != PsGetCurrentThread()) && (pEH->Thread !=
NULL))
{ // if all process || all thread || other thread same process
if (!(pEH->idProcess) || !(pEH->idThread) ||
- ((DWORD)(NtCurrentTeb()->Cid).UniqueProcess == pEH->idProcess))
+ ((DWORD)(NtCurrentTeb()->ClientId).UniqueProcess ==
pEH->idProcess))
{
Result = IntCallLowLevelEvent(pEH, Event, Window->hSelf, idObject,
idChild);
}
}// if ^skip own thread && ((Pid && CPid == Pid && ^skip
own process) || all process)
else if ( !(pEH->Flags & WINEVENT_SKIPOWNTHREAD) &&
( ((pEH->idProcess &&
- (DWORD)(NtCurrentTeb()->Cid).UniqueProcess == pEH->idProcess)
&&
+ (DWORD)(NtCurrentTeb()->ClientId).UniqueProcess == pEH->idProcess)
&&
!(pEH->Flags & WINEVENT_SKIPOWNPROCESS)) ||
!pEH->idProcess ) )
{
@@ -201,7 +201,7 @@
Window->hSelf,
idObject,
idChild,
- (DWORD)(NtCurrentTeb()->Cid).UniqueThread,
+ (DWORD)(NtCurrentTeb()->ClientId).UniqueThread,
(DWORD)EngGetTickCount(),
pEH->Proc);
}