MCPcopy Create free account
hub / github.com/OSGeo/gdal / GDALSetResponsiblePIDForCurrentThread

Function GDALSetResponsiblePIDForCurrentThread

gcore/gdaldataset.cpp:217–227  ·  view source on GitHub ↗

The current thread will act in the behalf of the thread of PID responsiblePID.

Source from the content-addressed store, hash-verified

215// The current thread will act in the behalf of the thread of PID
216// responsiblePID.
217void GDALSetResponsiblePIDForCurrentThread(GIntBig responsiblePID)
218{
219 GIntBig *pResponsiblePID =
220 static_cast<GIntBig *>(CPLGetTLS(CTLS_RESPONSIBLEPID));
221 if (pResponsiblePID == nullptr)
222 {
223 pResponsiblePID = static_cast<GIntBig *>(CPLMalloc(sizeof(GIntBig)));
224 CPLSetTLS(CTLS_RESPONSIBLEPID, pResponsiblePID, TRUE);
225 }
226 *pResponsiblePID = responsiblePID;
227}
228
229// Get the PID of the thread that the current thread will act in the behalf of
230// By default : the current thread acts in the behalf of itself.

Callers 4

~GDALDatasetPoolMethod · 0.85
_RefDatasetMethod · 0.85
RefUnderlyingDatasetMethod · 0.85

Calls 3

CPLGetTLSFunction · 0.85
CPLMallocFunction · 0.85
CPLSetTLSFunction · 0.85

Tested by

no test coverage detected