mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-24 09:48:46 +00:00
Fixed: #971 Another dead lock under Linux
This commit is contained in:
parent
04608ab726
commit
501742ad4f
5 changed files with 10 additions and 10 deletions
|
@ -56,7 +56,7 @@ using NLMISC::CSmartPtr;
|
|||
using NLMISC::CRGBA;
|
||||
using NLMISC::CVector;
|
||||
using NLMISC::CMatrix;
|
||||
using NLMISC::CSynchronized;
|
||||
using NLMISC::CUnfairSynchronized;
|
||||
|
||||
|
||||
class CMaterial;
|
||||
|
@ -144,7 +144,7 @@ public:
|
|||
|
||||
protected:
|
||||
|
||||
CSynchronized<TTexDrvInfoPtrMap> _SyncTexDrvInfos;
|
||||
CUnfairSynchronized<TTexDrvInfoPtrMap> _SyncTexDrvInfos;
|
||||
|
||||
TTexDrvSharePtrList _TexDrvShares;
|
||||
TMatDrvInfoPtrList _MatDrvInfos;
|
||||
|
|
|
@ -50,7 +50,7 @@ IDriver::~IDriver()
|
|||
// Must clean up everything before closing driver.
|
||||
// Must doing this in release(), so assert here if not done...
|
||||
{
|
||||
CSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||
CUnfairSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||
TTexDrvInfoPtrMap &rTexDrvInfos = access.value();
|
||||
nlassert( rTexDrvInfos.size() == 0 );
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ bool IDriver::release(void)
|
|||
|
||||
// Release refptr of TextureDrvInfos. Should be all null (because of precedent pass).
|
||||
{
|
||||
CSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||
CUnfairSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||
TTexDrvInfoPtrMap &rTexDrvInfos = access.value();
|
||||
|
||||
// must be empty, because precedent pass should have deleted all.
|
||||
|
@ -234,7 +234,7 @@ void IDriver::removeIBDrvInfoPtr(ItIBDrvInfoPtrList ibDrvInfoIt)
|
|||
// ***************************************************************************
|
||||
void IDriver::removeTextureDrvInfoPtr(ItTexDrvInfoPtrMap texDrvInfoIt)
|
||||
{
|
||||
CSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||
CUnfairSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||
TTexDrvInfoPtrMap &rTexDrvInfos = access.value();
|
||||
|
||||
rTexDrvInfos.erase(texDrvInfoIt);
|
||||
|
@ -268,7 +268,7 @@ bool IDriver::invalidateShareTexture (ITexture &texture)
|
|||
getTextureShareName (texture, name);
|
||||
|
||||
// Look for the driver info for this share name
|
||||
CSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||
CUnfairSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||
TTexDrvInfoPtrMap &rTexDrvInfos = access.value();
|
||||
TTexDrvInfoPtrMap::iterator iteDrvInfo = rTexDrvInfos.find (name);
|
||||
if (iteDrvInfo != rTexDrvInfos.end())
|
||||
|
|
|
@ -549,7 +549,7 @@ bool CDriverD3D::setupTextureEx (ITexture& tex, bool bUpload, bool &bAllUploaded
|
|||
|
||||
// insert or get the texture.
|
||||
{
|
||||
CSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||
CUnfairSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||
TTexDrvInfoPtrMap &rTexDrvInfos = access.value();
|
||||
|
||||
ItTexDrvInfoPtrMap itTex;
|
||||
|
@ -1013,7 +1013,7 @@ bool CDriverD3D::isTextureExist(const ITexture&tex)
|
|||
getTextureShareName (tex, name);
|
||||
|
||||
{
|
||||
CSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||
CUnfairSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||
TTexDrvInfoPtrMap &rTexDrvInfos = access.value();
|
||||
result = (rTexDrvInfos.find(name) != rTexDrvInfos.end());
|
||||
}
|
||||
|
|
|
@ -720,7 +720,7 @@ bool CDriverGL::isTextureExist(const ITexture&tex)
|
|||
getTextureShareName (tex, name);
|
||||
|
||||
{
|
||||
CSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||
CUnfairSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||
TTexDrvInfoPtrMap &rTexDrvInfos = access.value();
|
||||
result = (rTexDrvInfos.find(name) != rTexDrvInfos.end());
|
||||
}
|
||||
|
|
|
@ -656,7 +656,7 @@ bool CDriverGL::setupTextureEx (ITexture& tex, bool bUpload, bool &bAllUploaded,
|
|||
|
||||
// insert or get the texture.
|
||||
{
|
||||
CSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||
CUnfairSynchronized<TTexDrvInfoPtrMap>::CAccessor access(&_SyncTexDrvInfos);
|
||||
TTexDrvInfoPtrMap &rTexDrvInfos = access.value();
|
||||
|
||||
ItTexDrvInfoPtrMap itTex;
|
||||
|
|
Loading…
Reference in a new issue