Initialization/cleanup. */
| 14 | |
| 15 | /* Initialization/cleanup. */ |
| 16 | JEMALLOC_ALWAYS_INLINE bool |
| 17 | tsd_cleanup_wrapper(void) { |
| 18 | DWORD error = GetLastError(); |
| 19 | tsd_wrapper_t *wrapper = (tsd_wrapper_t *)TlsGetValue(tsd_tsd); |
| 20 | SetLastError(error); |
| 21 | |
| 22 | if (wrapper == NULL) { |
| 23 | return false; |
| 24 | } |
| 25 | |
| 26 | if (wrapper->initialized) { |
| 27 | wrapper->initialized = false; |
| 28 | tsd_cleanup(&wrapper->val); |
| 29 | if (wrapper->initialized) { |
| 30 | /* Trigger another cleanup round. */ |
| 31 | return true; |
| 32 | } |
| 33 | } |
| 34 | malloc_tsd_dalloc(wrapper); |
| 35 | return false; |
| 36 | } |
| 37 | |
| 38 | JEMALLOC_ALWAYS_INLINE void |
| 39 | tsd_wrapper_set(tsd_wrapper_t *wrapper) { |
nothing calls this directly
no test coverage detected