mirror of
https://github.com/reactos/reactos.git
synced 2024-08-07 19:58:21 +00:00
Revert an unwanted change committed by error.
svn path=/trunk/; revision=59327
This commit is contained in:
parent
60f250a72d
commit
3af19c1ef0
|
@ -549,7 +549,7 @@ ConDrvRegisterFrontEnd(IN PCONSOLE Console,
|
||||||
Console->TermIFace.Console = Console;
|
Console->TermIFace.Console = Console;
|
||||||
|
|
||||||
/* Initialize the frontend AFTER having attached it to the console */
|
/* Initialize the frontend AFTER having attached it to the console */
|
||||||
DPRINT1("Finish initialization of frontend\n");
|
DPRINT("Finish initialization of frontend\n");
|
||||||
Status = Console->TermIFace.Vtbl->InitFrontEnd(&Console->TermIFace, Console);
|
Status = Console->TermIFace.Vtbl->InitFrontEnd(&Console->TermIFace, Console);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
|
@ -565,9 +565,9 @@ ConDrvRegisterFrontEnd(IN PCONSOLE Console,
|
||||||
/* Copy buffer contents to screen */
|
/* Copy buffer contents to screen */
|
||||||
// FrontEnd.Draw();
|
// FrontEnd.Draw();
|
||||||
// ConioDrawConsole(Console);
|
// ConioDrawConsole(Console);
|
||||||
DPRINT1("Console drawn\n");
|
DPRINT("Console drawn\n");
|
||||||
|
|
||||||
DPRINT1("Terminal FrontEnd initialization done\n");
|
DPRINT("Terminal FrontEnd initialization done\n");
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -584,7 +584,7 @@ ConDrvDeregisterFrontEnd(IN PCONSOLE Console)
|
||||||
/* Detach the frontend from the console */
|
/* Detach the frontend from the console */
|
||||||
RtlZeroMemory(&Console->TermIFace, sizeof(Console->TermIFace));
|
RtlZeroMemory(&Console->TermIFace, sizeof(Console->TermIFace));
|
||||||
|
|
||||||
DPRINT1("Terminal FrontEnd unregistered\n");
|
DPRINT("Terminal FrontEnd unregistered\n");
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -597,28 +597,26 @@ ConDrvDeleteConsole(IN PCONSOLE Console)
|
||||||
* Forbid validation of any console by other threads
|
* Forbid validation of any console by other threads
|
||||||
* during the deletion of this console.
|
* during the deletion of this console.
|
||||||
*/
|
*/
|
||||||
// ConDrvLockConsoleListExclusive();
|
ConDrvLockConsoleListExclusive();
|
||||||
|
|
||||||
// /* Check the existence of the console, and if it's ok, continue */
|
/* Check the existence of the console, and if it's ok, continue */
|
||||||
// if (!ConDrvValidateConsolePointer(Console))
|
if (!ConDrvValidateConsolePointer(Console))
|
||||||
// {
|
{
|
||||||
// /* Unlock the console list and return */
|
/* Unlock the console list and return */
|
||||||
// ConDrvUnlockConsoleList();
|
ConDrvUnlockConsoleList();
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
|
||||||
// /*
|
/*
|
||||||
// * If the console is already being destroyed
|
* If the console is already being destroyed
|
||||||
// * (thus not running), just return.
|
* (thus not running), just return.
|
||||||
// */
|
*/
|
||||||
// if (!ConDrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE))
|
if (!ConDrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE))
|
||||||
// {
|
{
|
||||||
// /* Unlock the console list and return */
|
/* Unlock the console list and return */
|
||||||
// ConDrvUnlockConsoleList();
|
ConDrvUnlockConsoleList();
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
|
||||||
if (!ConDrvValidateConsole(Console, CONSOLE_RUNNING, TRUE)) return;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We are about to be destroyed. Signal it to other people
|
* We are about to be destroyed. Signal it to other people
|
||||||
|
@ -627,9 +625,6 @@ ConDrvDeleteConsole(IN PCONSOLE Console)
|
||||||
*/
|
*/
|
||||||
Console->State = CONSOLE_TERMINATING;
|
Console->State = CONSOLE_TERMINATING;
|
||||||
|
|
||||||
/* We really delete the console. Reset the count to be sure. */
|
|
||||||
Console->ReferenceCount = 0;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Allow other threads to finish their job: basically, unlock
|
* Allow other threads to finish their job: basically, unlock
|
||||||
* all other calls to EnterCriticalSection(&Console->Lock); by
|
* all other calls to EnterCriticalSection(&Console->Lock); by
|
||||||
|
@ -639,25 +634,14 @@ ConDrvDeleteConsole(IN PCONSOLE Console)
|
||||||
* can see that we are in fact already deleting the console.
|
* can see that we are in fact already deleting the console.
|
||||||
*/
|
*/
|
||||||
LeaveCriticalSection(&Console->Lock);
|
LeaveCriticalSection(&Console->Lock);
|
||||||
// ConDrvUnlockConsoleList();
|
ConDrvUnlockConsoleList();
|
||||||
|
|
||||||
/* FIXME: Send a terminate message to all the processes owning this console */
|
/* FIXME: Send a terminate message to all the processes owning this console */
|
||||||
|
|
||||||
/* Close all the applications which are linked to this console */
|
|
||||||
/*
|
|
||||||
* FIXME: Windows will wait up to 5 seconds for the thread to exit.
|
|
||||||
* We shouldn't wait here, though, since the console lock is entered.
|
|
||||||
* A copy of the thread list probably needs to be made.
|
|
||||||
*/
|
|
||||||
// ConDrvConsoleProcessCtrlEvent(Console, 0, CTRL_CLOSE_EVENT);
|
|
||||||
// DPRINT1("Apps closed\n");
|
|
||||||
// FIXME: Be sure that, starting from here, there is NO app running
|
|
||||||
// on this console anymore !!!!!
|
|
||||||
|
|
||||||
/* Cleanup the UI-oriented part */
|
/* Cleanup the UI-oriented part */
|
||||||
DPRINT1("Deregister console\n");
|
DPRINT("Deregister console\n");
|
||||||
ConDrvDeregisterFrontEnd(Console);
|
ConDrvDeregisterFrontEnd(Console);
|
||||||
DPRINT1("Console deregistered\n");
|
DPRINT("Console deregistered\n");
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* Check that the console is in terminating state before continuing
|
* Check that the console is in terminating state before continuing
|
||||||
|
@ -665,36 +649,30 @@ ConDrvDeleteConsole(IN PCONSOLE Console)
|
||||||
* ...unless to cancel console deletion ?).
|
* ...unless to cancel console deletion ?).
|
||||||
***/
|
***/
|
||||||
|
|
||||||
// ConDrvLockConsoleListExclusive();
|
ConDrvLockConsoleListExclusive();
|
||||||
|
|
||||||
// /* Re-check the existence of the console, and if it's ok, continue */
|
/* Re-check the existence of the console, and if it's ok, continue */
|
||||||
// if (!ConDrvValidateConsolePointer(Console))
|
if (!ConDrvValidateConsolePointer(Console))
|
||||||
// {
|
{
|
||||||
// /* Unlock the console list and return */
|
/* Unlock the console list and return */
|
||||||
// ConDrvUnlockConsoleList();
|
ConDrvUnlockConsoleList();
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
|
||||||
// if (!ConDrvValidateConsoleUnsafe(Console, CONSOLE_TERMINATING, TRUE))
|
if (!ConDrvValidateConsoleUnsafe(Console, CONSOLE_TERMINATING, TRUE))
|
||||||
// {
|
{
|
||||||
// ConDrvUnlockConsoleList();
|
ConDrvUnlockConsoleList();
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
|
||||||
if (!ConDrvValidateConsole(Console, CONSOLE_TERMINATING, TRUE)) return;
|
|
||||||
|
|
||||||
/* We are now in destruction */
|
/* We are now in destruction */
|
||||||
Console->State = CONSOLE_IN_DESTRUCTION;
|
Console->State = CONSOLE_IN_DESTRUCTION;
|
||||||
|
|
||||||
/////////////////////
|
|
||||||
ConDrvLockConsoleListExclusive();
|
|
||||||
/////////////////////
|
|
||||||
|
|
||||||
/* Remove the console from the list */
|
/* Remove the console from the list */
|
||||||
RemoveEntryList(&Console->Entry);
|
RemoveEntryList(&Console->Entry);
|
||||||
|
|
||||||
/* Unlock the console list */
|
/* We really delete the console. Reset the count to be sure. */
|
||||||
ConDrvUnlockConsoleList();
|
Console->ReferenceCount = 0;
|
||||||
|
|
||||||
/* Discard all entries in the input event queue */
|
/* Discard all entries in the input event queue */
|
||||||
PurgeInputBuffer(Console);
|
PurgeInputBuffer(Console);
|
||||||
|
@ -726,8 +704,8 @@ ConDrvDeleteConsole(IN PCONSOLE Console)
|
||||||
ConsoleFreeHeap(Console);
|
ConsoleFreeHeap(Console);
|
||||||
DPRINT("ConDrvDeleteConsole - Console destroyed\n");
|
DPRINT("ConDrvDeleteConsole - Console destroyed\n");
|
||||||
|
|
||||||
// /* Unlock the console list and return */
|
/* Unlock the console list and return */
|
||||||
// ConDrvUnlockConsoleList();
|
ConDrvUnlockConsoleList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue