| 103 | } |
| 104 | |
| 105 | apr_status_t ap_queue_info_set_idle(fd_queue_info_t *queue_info, |
| 106 | apr_pool_t *pool_to_recycle) |
| 107 | { |
| 108 | apr_status_t rv; |
| 109 | |
| 110 | ap_queue_info_push_pool(queue_info, pool_to_recycle); |
| 111 | |
| 112 | /* If other threads are waiting on a worker, wake one up */ |
| 113 | if (apr_atomic_inc32(&queue_info->idlers) < zero_pt) { |
| 114 | rv = apr_thread_mutex_lock(queue_info->idlers_mutex); |
| 115 | if (rv != APR_SUCCESS) { |
| 116 | AP_DEBUG_ASSERT(0); |
| 117 | return rv; |
| 118 | } |
| 119 | rv = apr_thread_cond_signal(queue_info->wait_for_idler); |
| 120 | if (rv != APR_SUCCESS) { |
| 121 | apr_thread_mutex_unlock(queue_info->idlers_mutex); |
| 122 | return rv; |
| 123 | } |
| 124 | rv = apr_thread_mutex_unlock(queue_info->idlers_mutex); |
| 125 | if (rv != APR_SUCCESS) { |
| 126 | return rv; |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | return APR_SUCCESS; |
| 131 | } |
| 132 | |
| 133 | apr_status_t ap_queue_info_try_get_idler(fd_queue_info_t *queue_info) |
| 134 | { |
no test coverage detected