Initialization/cleanup. */
| 29 | |
| 30 | /* Initialization/cleanup. */ |
| 31 | JEMALLOC_ALWAYS_INLINE void |
| 32 | tsd_cleanup_wrapper(void *arg) { |
| 33 | tsd_wrapper_t *wrapper = (tsd_wrapper_t *)arg; |
| 34 | |
| 35 | if (wrapper->initialized) { |
| 36 | wrapper->initialized = false; |
| 37 | tsd_cleanup(&wrapper->val); |
| 38 | if (wrapper->initialized) { |
| 39 | /* Trigger another cleanup round. */ |
| 40 | if (pthread_setspecific(tsd_tsd, (void *)wrapper) != 0) |
| 41 | { |
| 42 | malloc_write("<jemalloc>: Error setting TSD\n"); |
| 43 | if (opt_abort) { |
| 44 | abort(); |
| 45 | } |
| 46 | } |
| 47 | return; |
| 48 | } |
| 49 | } |
| 50 | malloc_tsd_dalloc(wrapper); |
| 51 | } |
| 52 | |
| 53 | JEMALLOC_ALWAYS_INLINE void |
| 54 | tsd_wrapper_set(tsd_wrapper_t *wrapper) { |
nothing calls this directly
no test coverage detected