| 204 | } |
| 205 | |
| 206 | extent_hooks_t * |
| 207 | extent_hooks_set(tsd_t *tsd, arena_t *arena, extent_hooks_t *extent_hooks) { |
| 208 | background_thread_info_t *info; |
| 209 | if (have_background_thread) { |
| 210 | info = arena_background_thread_info_get(arena); |
| 211 | malloc_mutex_lock(tsd_tsdn(tsd), &info->mtx); |
| 212 | } |
| 213 | extent_hooks_t *ret = base_extent_hooks_set(arena->base, extent_hooks); |
| 214 | if (have_background_thread) { |
| 215 | malloc_mutex_unlock(tsd_tsdn(tsd), &info->mtx); |
| 216 | } |
| 217 | |
| 218 | return ret; |
| 219 | } |
| 220 | |
| 221 | static void |
| 222 | extent_hooks_assure_initialized(arena_t *arena, |
no test coverage detected