| 269 | } |
| 270 | |
| 271 | static bool |
| 272 | background_thread_pause_check(tsdn_t *tsdn, background_thread_info_t *info) { |
| 273 | if (unlikely(info->state == background_thread_paused)) { |
| 274 | malloc_mutex_unlock(tsdn, &info->mtx); |
| 275 | /* Wait on global lock to update status. */ |
| 276 | malloc_mutex_lock(tsdn, &background_thread_lock); |
| 277 | malloc_mutex_unlock(tsdn, &background_thread_lock); |
| 278 | malloc_mutex_lock(tsdn, &info->mtx); |
| 279 | return true; |
| 280 | } |
| 281 | |
| 282 | return false; |
| 283 | } |
| 284 | |
| 285 | static inline void |
| 286 | background_work_sleep_once(tsdn_t *tsdn, background_thread_info_t *info, unsigned ind) { |
no test coverage detected