mirror of
https://github.com/reactos/reactos.git
synced 2024-09-06 10:52:52 +00:00
Lock/unlock address space in KeReleasThread.
svn path=/trunk/; revision=2930
This commit is contained in:
parent
d05ba1b39e
commit
a76424cbbb
|
@ -16,7 +16,8 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/*
|
/* $Id: kthread.c,v 1.23 2002/05/07 22:34:17 hbirr Exp $
|
||||||
|
*
|
||||||
* FILE: ntoskrnl/ke/kthread.c
|
* FILE: ntoskrnl/ke/kthread.c
|
||||||
* PURPOSE: Microkernel thread support
|
* PURPOSE: Microkernel thread support
|
||||||
* PROGRAMMER: David Welch (welch@cwcom.net)
|
* PROGRAMMER: David Welch (welch@cwcom.net)
|
||||||
|
@ -65,11 +66,13 @@ KeReleaseThread(PETHREAD Thread)
|
||||||
|
|
||||||
if (Thread->Tcb.StackLimit != (ULONG)&init_stack)
|
if (Thread->Tcb.StackLimit != (ULONG)&init_stack)
|
||||||
{
|
{
|
||||||
|
MmLockAddressSpace(MmGetKernelAddressSpace());
|
||||||
MmFreeMemoryArea(MmGetKernelAddressSpace(),
|
MmFreeMemoryArea(MmGetKernelAddressSpace(),
|
||||||
(PVOID)Thread->Tcb.StackLimit,
|
(PVOID)Thread->Tcb.StackLimit,
|
||||||
MM_STACK_SIZE,
|
MM_STACK_SIZE,
|
||||||
KeFreeStackPage,
|
KeFreeStackPage,
|
||||||
NULL);
|
NULL);
|
||||||
|
MmUnlockAddressSpace(MmGetKernelAddressSpace());
|
||||||
}
|
}
|
||||||
Thread->Tcb.StackLimit = 0;
|
Thread->Tcb.StackLimit = 0;
|
||||||
Thread->Tcb.InitialStack = NULL;
|
Thread->Tcb.InitialStack = NULL;
|
||||||
|
|
Loading…
Reference in a new issue