else
{
Process = Thread->ThreadsProcess;
- ExAcquireFastMutex(&Process->TebLock);
+ PsLockProcess(Process, FALSE);
if (NULL == Process->TebBlock ||
Process->TebBlock == Process->TebLastAllocated)
{
PAGE_READWRITE);
if (! NT_SUCCESS(Status))
{
- ExReleaseFastMutex(&Process->TebLock);
+ PsUnlockProcess(Process);
DPRINT1("Failed to reserve virtual memory for TEB\n");
return Status;
}
return Status;
}
Process->TebLastAllocated = TebBase;
- ExReleaseFastMutex(&Process->TebLock);
+ PsUnlockProcess(Process);
}
DPRINT ("TebBase %p TebSize %lu\n", TebBase, TebSize);