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

Function createThread

src/OSspecific/POSIX/POSIX.C:1383–1399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1381
1382
1383void Foam::createThread
1384(
1385 const label index,
1386 void *(*start_routine) (void *),
1387 void *arg
1388)
1389{
1390 if (POSIX::debug)
1391 {
1392 Pout<< "createThread : index:" << index << endl;
1393 }
1394 if (pthread_create(&threads_[index](), nullptr, start_routine, arg))
1395 {
1396 FatalErrorInFunction
1397 << "Failed starting thread " << index << exit(FatalError);
1398 }
1399}
1400
1401
1402void Foam::joinThread(const label index)

Callers 1

writeFunction · 0.85

Calls 1

exitFunction · 0.50

Tested by

no test coverage detected