equal
deleted
inserted
replaced
588 { |
588 { |
589 DThread* pT=_LOFF(pLink,DThread,iProcessLink); |
589 DThread* pT=_LOFF(pLink,DThread,iProcessLink); |
590 pLink=pLink->iNext; |
590 pLink=pLink->iNext; |
591 if (pT!=pC) |
591 if (pT!=pC) |
592 { |
592 { |
|
593 // If killing pT will cause a system crash then force that to happen in the context of the |
|
594 // current thread |
|
595 if(pT->iFlags & KThreadFlagSystemPermanent) |
|
596 { |
|
597 K::Fault(K::EPermanentThreadExit); |
|
598 } |
|
599 if (aType != EExitKill && (pT->iFlags & KThreadFlagSystemCritical)) |
|
600 { |
|
601 K::Fault(K::ESystemThreadPanic); |
|
602 } |
593 // Need to stop the current thread being killed as a consequence of killing pT |
603 // Need to stop the current thread being killed as a consequence of killing pT |
594 pT->iFlags &= ~(KThreadFlagProcessPermanent|KThreadFlagProcessCritical); |
604 pT->iFlags &= ~(KThreadFlagProcessPermanent|KThreadFlagProcessCritical); |
595 pT->Die(aType, aReason, aCategory); |
605 pT->Die(aType, aReason, aCategory); |
596 } |
606 } |
597 else |
607 else |