Create a new background thread if needed. */
| 590 | |
| 591 | /* Create a new background thread if needed. */ |
| 592 | bool |
| 593 | background_thread_create(tsd_t *tsd, unsigned arena_ind) { |
| 594 | assert(have_background_thread); |
| 595 | |
| 596 | bool ret; |
| 597 | malloc_mutex_lock(tsd_tsdn(tsd), &background_thread_lock); |
| 598 | ret = background_thread_create_locked(tsd, arena_ind); |
| 599 | malloc_mutex_unlock(tsd_tsdn(tsd), &background_thread_lock); |
| 600 | |
| 601 | return ret; |
| 602 | } |
| 603 | |
| 604 | bool |
| 605 | background_threads_enable(tsd_t *tsd) { |
no test coverage detected