The current thread will act in the behalf of the thread of PID responsiblePID.
| 215 | // The current thread will act in the behalf of the thread of PID |
| 216 | // responsiblePID. |
| 217 | void 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. |
no test coverage detected