mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0023286: Standard_Mutex behavior depends on platform
Implemented recursive POSIX mutex instead of non-recursive, Removed SentryNested class, implemented it's features into Sentry class Added second constructor to Sentry class
This commit is contained in:
@@ -57,8 +57,6 @@
|
||||
|
||||
#define UVDEFLECTION 1.e-05
|
||||
|
||||
static Standard_Mutex DummyMutex;
|
||||
|
||||
static Standard_Real FUN_CalcAverageDUV(TColStd_Array1OfReal& P, const Standard_Integer PLen)
|
||||
{
|
||||
Standard_Integer i, j, n = 0;
|
||||
@@ -363,8 +361,7 @@ Standard_Boolean BRepMesh_FastDiscretFace::RestoreStructureFromTriangulation
|
||||
{
|
||||
// lock mutex during querying data from edge curves to prevent parallel change of the same data
|
||||
Standard_Mutex* aMutex = theMutexProvider.GetMutex(theEdge);
|
||||
Standard_Mutex::SentryNested aSentry(aMutex == NULL ? DummyMutex : *aMutex,
|
||||
aMutex != NULL);
|
||||
Standard_Mutex::Sentry aSentry (aMutex);
|
||||
|
||||
Poly = BRep_Tool::PolygonOnTriangulation(theEdge, theTrigu, theLoc);
|
||||
if (Poly.IsNull() || !Poly->HasParameters())
|
||||
@@ -1636,8 +1633,7 @@ void BRepMesh_FastDiscretFace::AddInShape(const TopoDS_Face& theFace,
|
||||
|
||||
// lock mutex to prevent parallel change of the same data
|
||||
Standard_Mutex* aMutex = theMutexProvider.GetMutex(It.Key());
|
||||
Standard_Mutex::SentryNested aSentry(aMutex == NULL ? DummyMutex : *aMutex,
|
||||
aMutex != NULL);
|
||||
Standard_Mutex::Sentry aSentry (aMutex);
|
||||
|
||||
if ( NOD1 == NOD2 ) {
|
||||
B.UpdateEdge(TopoDS::Edge(It.Key()), NullPoly, TOld,loc);
|
||||
|
Reference in New Issue
Block a user