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).

svn path=/trunk/; revision=35631
This commit is contained in:
Timo Kreuzer 2008-08-25 16:38:02 +00:00
parent b81b76caab
commit 016e911156
13 changed files with 26 additions and 26 deletions

View file

@ -73,7 +73,7 @@ CsrIdentifyAlertableThread (VOID)
/* 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,

View file

@ -152,7 +152,7 @@ CsrClientCallServer(PCSR_API_MESSAGE ApiMessage,
{
/* 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);

View file

@ -48,7 +48,7 @@ GdiProcessSetup (VOID)
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;
}

View file

@ -55,7 +55,7 @@ CreatePipe(PHANDLE hReadPipe,
/* Create the pipe name */
swprintf(Buffer,
L"\\Device\\NamedPipe\\Win32Pipes.%08x.%08x",
NtCurrentTeb()->Cid.UniqueProcess,
NtCurrentTeb()->ClientId.UniqueProcess,
PipeId);
RtlInitUnicodeString(&PipeName, Buffer);

View file

@ -272,7 +272,7 @@ GetCurrentThread(VOID)
DWORD STDCALL
GetCurrentProcessId(VOID)
{
return((DWORD)GetTeb()->Cid.UniqueProcess);
return((DWORD)GetTeb()->ClientId.UniqueProcess);
}

View file

@ -319,7 +319,7 @@ DWORD
WINAPI
GetCurrentThreadId(VOID)
{
return (DWORD)(NtCurrentTeb()->Cid).UniqueThread;
return (DWORD)(NtCurrentTeb()->ClientId).UniqueThread;
}
/*

View file

@ -1313,8 +1313,8 @@ GetWindowThreadProcessId(HWND hWnd,
{ // 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.

View file

@ -729,7 +729,7 @@ typedef struct _TEB
{
NT_TIB Tib;
PVOID EnvironmentPointer;
CLIENT_ID Cid;
CLIENT_ID ClientId;
PVOID ActiveRpcHandle;
PVOID ThreadLocalStoragePointer;
struct _PEB *ProcessEnvironmentBlock;

View file

@ -310,7 +310,7 @@ RtlpFreeDebugInfo(PRTL_CRITICAL_SECTION_DEBUG DebugInfo)
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 @@ RtlpFreeDebugInfo(PRTL_CRITICAL_SECTION_DEBUG DebugInfo)
/* 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 @@ NTSTATUS
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 @@ RtlInitializeCriticalSectionAndSpinCount(PRTL_CRITICAL_SECTION CriticalSection,
CritcalSectionDebugData = RtlpAllocateDebugInfo();
DPRINT("Allocated Debug Data: %p inside Process: %p\n",
CritcalSectionDebugData,
NtCurrentTeb()->Cid.UniqueProcess);
NtCurrentTeb()->ClientId.UniqueProcess);
if (!CritcalSectionDebugData) {
@ -657,11 +657,11 @@ RtlTryEnterCriticalSection(PRTL_CRITICAL_SECTION CriticalSection)
-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);

View file

@ -234,7 +234,7 @@ RtlQueryProcessDebugInformation(IN ULONG ProcessId,
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);

View file

@ -94,7 +94,7 @@ start:
}
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 @@ wait:
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 @@ start:
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 @@ RtlConvertSharedToExclusive(PRTL_RESOURCE Resource)
if (Resource->NumberActive == 1)
{
Resource->OwningThread = NtCurrentTeb()->Cid.UniqueThread;
Resource->OwningThread = NtCurrentTeb()->ClientId.UniqueThread;
Resource->NumberActive = -1;
}
else
@ -233,7 +233,7 @@ RtlConvertSharedToExclusive(PRTL_RESOURCE Resource)
return;
RtlEnterCriticalSection(&Resource->Lock);
Resource->OwningThread = NtCurrentTeb()->Cid.UniqueThread;
Resource->OwningThread = NtCurrentTeb()->ClientId.UniqueThread;
Resource->NumberActive = -1;
}
RtlLeaveCriticalSection(&Resource->Lock);

View file

@ -452,7 +452,7 @@ MmCreateTeb(PEPROCESS Process,
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;

View file

@ -155,7 +155,7 @@ co_EVENT_CallEvents( DWORD event,
hwnd,
pEP->idObject,
pEP->idChild,
(DWORD)(NtCurrentTeb()->Cid).UniqueThread,
(DWORD)(NtCurrentTeb()->ClientId).UniqueThread,
(DWORD)EngGetTickCount(),
pEH->Proc);
return Result;
@ -185,14 +185,14 @@ IntNotifyWinEvent(
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 @@ IntNotifyWinEvent(
Window->hSelf,
idObject,
idChild,
(DWORD)(NtCurrentTeb()->Cid).UniqueThread,
(DWORD)(NtCurrentTeb()->ClientId).UniqueThread,
(DWORD)EngGetTickCount(),
pEH->Proc);
}