| 638 | } |
| 639 | |
| 640 | bool |
| 641 | background_threads_disable(tsd_t *tsd) { |
| 642 | assert(!background_thread_enabled()); |
| 643 | malloc_mutex_assert_owner(tsd_tsdn(tsd), &background_thread_lock); |
| 644 | |
| 645 | /* Thread 0 will be responsible for terminating other threads. */ |
| 646 | if (background_threads_disable_single(tsd, |
| 647 | &background_thread_info[0])) { |
| 648 | return true; |
| 649 | } |
| 650 | assert(n_background_threads == 0); |
| 651 | |
| 652 | return false; |
| 653 | } |
| 654 | |
| 655 | /* Check if we need to signal the background thread early. */ |
| 656 | void |
no test coverage detected