* xmlCheckThreadLocalStorage: * * Check whether thread-local storage could be allocated. * * In cross-platform code running in multithreaded environments, this * function should be called once in each thread before calling other * library functions to make sure that thread-local storage was * allocated properly. * * Returns 0 on success or -1 if a memory allocation failed. A failed * all
| 972 | * Available since v2.12.0. |
| 973 | */ |
| 974 | int |
| 975 | xmlCheckThreadLocalStorage(void) { |
| 976 | #if defined(LIBXML_THREAD_ENABLED) && !defined(USE_TLS) |
| 977 | if ((!xmlIsMainThreadInternal()) && (xmlGetThreadLocalStorage(1) == NULL)) |
| 978 | return(-1); |
| 979 | #endif |
| 980 | return(0); |
| 981 | } |
| 982 | |
| 983 | /** DOC_DISABLE */ |
| 984 |
nothing calls this directly
no test coverage detected