MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / lockMutex

Function lockMutex

src/OSspecific/POSIX/POSIX.C:1453–1464  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1451
1452
1453void Foam::lockMutex(const label index)
1454{
1455 if (POSIX::debug)
1456 {
1457 Pout<< "lockMutex : index:" << index << endl;
1458 }
1459 if (pthread_mutex_lock(&mutexes_[index]()))
1460 {
1461 FatalErrorInFunction << "Failed locking mutex " << index
1462 << exit(FatalError);
1463 }
1464}
1465
1466
1467void Foam::unlockMutex(const label index)

Callers 2

writeAllFunction · 0.85
writeFunction · 0.85

Calls 1

exitFunction · 0.50

Tested by

no test coverage detected