Skip to content

Commit

Permalink
CPLCreateOrAcquireMutexEx(): fix TSAN/valgrind --tool=helgrind warnin…
Browse files Browse the repository at this point in the history
…g about lock-order inversion (fixes #1108)
  • Loading branch information
rouault committed Feb 19, 2024
1 parent 3b8d4a4 commit fd57dd8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions port/cpl_multiproc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,14 +318,14 @@ CPLMutex *CPLCreateOrAcquireMasterMutex(double dfWaitInSeconds = 1000.0)

#ifdef MUTEX_NONE

int CPLCreateOrAcquireMutexEx(CPLMutex **phMutex, double dfWaitInSeconds,
int nOptions)
bool CPLCreateOrAcquireMutexEx(CPLMutex **phMutex, double dfWaitInSeconds,
int nOptions)
{
return false;
}
#else
int CPLCreateOrAcquireMutexEx(CPLMutex **phMutex, double dfWaitInSeconds,
int nOptions)
bool CPLCreateOrAcquireMutexEx(CPLMutex **phMutex, double dfWaitInSeconds,
int nOptions)
{
bool bSuccess = false;

Expand Down

0 comments on commit fd57dd8

Please sign in to comment.