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