0023988: Force use of reentrant mode
[occt.git] / src / NCollection / NCollection_BaseAllocator.cxx
index f51c48f..267744c 100755 (executable)
@@ -183,9 +183,7 @@ void NCollection_BaseAllocator::StandardCallBack
                      const Standard_Size /*theSize*/)
 {
   static Standard_Mutex aMutex;
-  Standard_Boolean isReentrant = Standard::IsReentrant();
-  if (isReentrant)
-    aMutex.Lock();
+  aMutex.Lock();
   // statistics by storage size
   NCollection_DataMap<Standard_Size, StorageInfo>& aStMap = StorageMap();
   if (!aStMap.IsBound(theRoundSize))
@@ -230,8 +228,7 @@ void NCollection_BaseAllocator::StandardCallBack
     }
   }
 
-  if (isReentrant)
-    aMutex.Unlock();
+  aMutex.Unlock();
 }
 
 //=======================================================================