mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 16:05:51 +00:00
[NTOS:KE] Improve freeze code in KeBugCheckWithTf
- Don't wait 1 second for each processor - Use AFFINITY_MASK - Use Prcb->Number, which is more future proof than KeGetCurrentProcessorNumber - Improve for loop
This commit is contained in:
parent
d96f01b5dc
commit
1d289fec77
1 changed files with 7 additions and 8 deletions
|
@ -727,9 +727,6 @@ KeBugCheckWithTf(IN ULONG BugCheckCode,
|
||||||
PLDR_DATA_TABLE_ENTRY LdrEntry;
|
PLDR_DATA_TABLE_ENTRY LdrEntry;
|
||||||
PULONG_PTR HardErrorParameters;
|
PULONG_PTR HardErrorParameters;
|
||||||
KIRQL OldIrql;
|
KIRQL OldIrql;
|
||||||
#ifdef CONFIG_SMP
|
|
||||||
LONG i = 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Set active bugcheck */
|
/* Set active bugcheck */
|
||||||
KeBugCheckActive = TRUE;
|
KeBugCheckActive = TRUE;
|
||||||
|
@ -1083,15 +1080,17 @@ KeBugCheckWithTf(IN ULONG BugCheckCode,
|
||||||
KeBugCheckOwner = Prcb->Number;
|
KeBugCheckOwner = Prcb->Number;
|
||||||
|
|
||||||
/* Freeze the other CPUs */
|
/* Freeze the other CPUs */
|
||||||
for (i = 0; i < KeNumberProcessors; i++)
|
for (ULONG i = 0; i < KeNumberProcessors; i++)
|
||||||
{
|
{
|
||||||
if (i != (LONG)KeGetCurrentProcessorNumber())
|
if (i != Prcb->Number)
|
||||||
{
|
{
|
||||||
/* Send the IPI and give them one second to catch up */
|
/* Send the IPI */
|
||||||
KiIpiSend(1 << i, IPI_FREEZE);
|
KiIpiSend(AFFINITY_MASK(i), IPI_FREEZE);
|
||||||
KeStallExecutionProcessor(1000000);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Give the other CPUs one second to catch up */
|
||||||
|
KeStallExecutionProcessor(1000000);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Display the BSOD */
|
/* Display the BSOD */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue