Leaked source code of windows server 2003
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
/*++
Copyright (c) 1990 Microsoft Corporation
Module Name:
eballoc.c
Abstract:
Process/Thread Environment Block allocation functions
Author:
Steve Wood (stevewo) 10-May-1990
Revision History:
--*/
#include "ntrtlp.h"
#include <nturtl.h>
#if defined(ALLOC_PRAGMA) && defined(NTOS_KERNEL_RUNTIME)
#pragma alloc_text(INIT,RtlAcquirePebLock)
#pragma alloc_text(INIT,RtlReleasePebLock)
#endif
#undef RtlAcquirePebLock
VOID RtlAcquirePebLock( VOID ) {
#if !defined(NTOS_KERNEL_RUNTIME)
PPEB Peb;
Peb = NtCurrentPeb();
RtlEnterCriticalSection (Peb->FastPebLock);
#endif
}
#undef RtlReleasePebLock
VOID RtlReleasePebLock( VOID ) { #if !defined(NTOS_KERNEL_RUNTIME)
PPEB Peb;
Peb = NtCurrentPeb();
RtlLeaveCriticalSection (Peb->FastPebLock);
#endif
}
#if DBG
VOID RtlAssertPebLockOwned( VOID ) { #if !defined(NTOS_KERNEL_RUNTIME)
ASSERT(NtCurrentPeb()->FastPebLock->OwningThread == NtCurrentTeb()->ClientId.UniqueThread);
#endif
} #endif
|