mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-27 19:10:52 +00:00
Fix thread lockup in zone lighter
This commit is contained in:
parent
e51a102855
commit
1b806ab4b5
2 changed files with 7 additions and 0 deletions
|
@ -466,6 +466,7 @@ private:
|
||||||
uint _NumberOfPatchComputed;
|
uint _NumberOfPatchComputed;
|
||||||
uint _ProcessCount;
|
uint _ProcessCount;
|
||||||
uint64 _CPUMask;
|
uint64 _CPUMask;
|
||||||
|
NLMISC::CMutex _ProcessExitedMutex;
|
||||||
volatile uint _ProcessExited;
|
volatile uint _ProcessExited;
|
||||||
|
|
||||||
// *** Bitmap sharing
|
// *** Bitmap sharing
|
||||||
|
|
|
@ -373,7 +373,9 @@ public:
|
||||||
setCPUMask (Thread, _Process);
|
setCPUMask (Thread, _Process);
|
||||||
|
|
||||||
_ZoneLighter->processCalc (_Process, *_Description);
|
_ZoneLighter->processCalc (_Process, *_Description);
|
||||||
|
_ZoneLighter->_ProcessExitedMutex.enter();
|
||||||
_ZoneLighter->_ProcessExited++;
|
_ZoneLighter->_ProcessExited++;
|
||||||
|
_ZoneLighter->_ProcessExitedMutex.leave();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -649,7 +651,9 @@ void NL3D::CRenderZBuffer::run()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Exit
|
// Exit
|
||||||
|
_ZoneLighter->_ProcessExitedMutex.enter();
|
||||||
_ZoneLighter->_ProcessExited++;
|
_ZoneLighter->_ProcessExited++;
|
||||||
|
_ZoneLighter->_ProcessExitedMutex.leave();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
@ -676,7 +680,9 @@ public:
|
||||||
void run()
|
void run()
|
||||||
{
|
{
|
||||||
_ZoneLighter->processLightableShapeCalc(_Process, _ShapesToLit, _FirstShape, _LastShape, *_Description);
|
_ZoneLighter->processLightableShapeCalc(_Process, _ShapesToLit, _FirstShape, _LastShape, *_Description);
|
||||||
|
_ZoneLighter->_ProcessExitedMutex.enter();
|
||||||
_ZoneLighter->_ProcessExited++;
|
_ZoneLighter->_ProcessExited++;
|
||||||
|
_ZoneLighter->_ProcessExitedMutex.leave();
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
CZoneLighter *_ZoneLighter;
|
CZoneLighter *_ZoneLighter;
|
||||||
|
|
Loading…
Reference in a new issue