| 810 | #endif /* defined(JEMALLOC_BACKGROUND_THREAD) */ |
| 811 | |
| 812 | bool |
| 813 | background_thread_boot0(void) { |
| 814 | if (!have_background_thread && opt_background_thread) { |
| 815 | malloc_printf("<jemalloc>: option background_thread currently " |
| 816 | "supports pthread only\n"); |
| 817 | return true; |
| 818 | } |
| 819 | |
| 820 | #ifdef JEMALLOC_PTHREAD_CREATE_WRAPPER |
| 821 | pthread_create_fptr = dlsym(RTLD_NEXT, "pthread_create"); |
| 822 | if (pthread_create_fptr == NULL) { |
| 823 | can_enable_background_thread = false; |
| 824 | if (config_lazy_lock || opt_background_thread) { |
| 825 | malloc_write("<jemalloc>: Error in dlsym(RTLD_NEXT, " |
| 826 | "\"pthread_create\")\n"); |
| 827 | abort(); |
| 828 | } |
| 829 | } else { |
| 830 | can_enable_background_thread = true; |
| 831 | } |
| 832 | #endif |
| 833 | return false; |
| 834 | } |
| 835 | |
| 836 | bool |
| 837 | background_thread_boot1(tsdn_t *tsdn) { |
no test coverage detected