Warning: The CPLTLSFreeFunc must not in any case directly or indirectly use or fetch any TLS data, or a terminating thread will hang!
| 2309 | // Warning: The CPLTLSFreeFunc must not in any case directly or indirectly |
| 2310 | // use or fetch any TLS data, or a terminating thread will hang! |
| 2311 | void CPLSetTLSWithFreeFunc(int nIndex, void *pData, CPLTLSFreeFunc pfnFree) |
| 2312 | |
| 2313 | { |
| 2314 | void **l_papTLSList = CPLGetTLSList(nullptr); |
| 2315 | |
| 2316 | CPLAssert(nIndex >= 0 && nIndex < CTLS_MAX); |
| 2317 | |
| 2318 | l_papTLSList[nIndex] = pData; |
| 2319 | l_papTLSList[CTLS_MAX + nIndex] = reinterpret_cast<void *>(pfnFree); |
| 2320 | } |
| 2321 | |
| 2322 | /************************************************************************/ |
| 2323 | /* CPLSetTLSWithFreeFuncEx() */ |
no test coverage detected