OSspecific/POSIX: Updated function name in diagnostic messages
Patch contributed by Bruno Santos Resolves bug-report https://bugs.openfoam.org/view.php?id=2786
This commit is contained in:
@ -1387,7 +1387,7 @@ Foam::label Foam::allocateThread()
|
||||
{
|
||||
if (POSIX::debug)
|
||||
{
|
||||
Pout<< "allocateThread : reusing index:" << i << endl;
|
||||
Pout<< FUNCTION_NAME << " : reusing index:" << i << endl;
|
||||
}
|
||||
// Reuse entry
|
||||
threads_[i].reset(new pthread_t());
|
||||
@ -1398,7 +1398,7 @@ Foam::label Foam::allocateThread()
|
||||
label index = threads_.size();
|
||||
if (POSIX::debug)
|
||||
{
|
||||
Pout<< "allocateThread : new index:" << index << endl;
|
||||
Pout<< FUNCTION_NAME << " : new index:" << index << endl;
|
||||
}
|
||||
threads_.append(autoPtr<pthread_t>(new pthread_t()));
|
||||
|
||||
@ -1415,7 +1415,7 @@ void Foam::createThread
|
||||
{
|
||||
if (POSIX::debug)
|
||||
{
|
||||
Pout<< "createThread : index:" << index << endl;
|
||||
Pout<< FUNCTION_NAME << " : index:" << index << endl;
|
||||
}
|
||||
if (pthread_create(&threads_[index](), nullptr, start_routine, arg))
|
||||
{
|
||||
@ -1429,11 +1429,11 @@ void Foam::joinThread(const label index)
|
||||
{
|
||||
if (POSIX::debug)
|
||||
{
|
||||
Pout<< "freeThread : join:" << index << endl;
|
||||
Pout<< FUNCTION_NAME << " : index:" << index << endl;
|
||||
}
|
||||
if (pthread_join(threads_[index](), nullptr))
|
||||
{
|
||||
FatalErrorInFunction << "Failed freeing thread " << index
|
||||
FatalErrorInFunction << "Failed joining thread " << index
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
@ -1443,7 +1443,7 @@ void Foam::freeThread(const label index)
|
||||
{
|
||||
if (POSIX::debug)
|
||||
{
|
||||
Pout<< "freeThread : index:" << index << endl;
|
||||
Pout<< FUNCTION_NAME << " : index:" << index << endl;
|
||||
}
|
||||
threads_[index].clear();
|
||||
}
|
||||
@ -1457,7 +1457,7 @@ Foam::label Foam::allocateMutex()
|
||||
{
|
||||
if (POSIX::debug)
|
||||
{
|
||||
Pout<< "allocateMutex : reusing index:" << i << endl;
|
||||
Pout<< FUNCTION_NAME << " : reusing index:" << i << endl;
|
||||
}
|
||||
// Reuse entry
|
||||
mutexes_[i].reset(new pthread_mutex_t());
|
||||
@ -1469,7 +1469,7 @@ Foam::label Foam::allocateMutex()
|
||||
|
||||
if (POSIX::debug)
|
||||
{
|
||||
Pout<< "allocateMutex : new index:" << index << endl;
|
||||
Pout<< FUNCTION_NAME << " : new index:" << index << endl;
|
||||
}
|
||||
mutexes_.append(autoPtr<pthread_mutex_t>(new pthread_mutex_t()));
|
||||
return index;
|
||||
@ -1480,7 +1480,7 @@ void Foam::lockMutex(const label index)
|
||||
{
|
||||
if (POSIX::debug)
|
||||
{
|
||||
Pout<< "lockMutex : index:" << index << endl;
|
||||
Pout<< FUNCTION_NAME << " : index:" << index << endl;
|
||||
}
|
||||
if (pthread_mutex_lock(&mutexes_[index]()))
|
||||
{
|
||||
@ -1494,7 +1494,7 @@ void Foam::unlockMutex(const label index)
|
||||
{
|
||||
if (POSIX::debug)
|
||||
{
|
||||
Pout<< "unlockMutex : index:" << index << endl;
|
||||
Pout<< FUNCTION_NAME << " : index:" << index << endl;
|
||||
}
|
||||
if (pthread_mutex_unlock(&mutexes_[index]()))
|
||||
{
|
||||
@ -1508,7 +1508,7 @@ void Foam::freeMutex(const label index)
|
||||
{
|
||||
if (POSIX::debug)
|
||||
{
|
||||
Pout<< "freeMutex : index:" << index << endl;
|
||||
Pout<< FUNCTION_NAME << " : index:" << index << endl;
|
||||
}
|
||||
mutexes_[index].clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user