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