fdqueue.c revision 7677dd9b01d498a2af1cddb8e2506a25d7da630b
f757855e81fc0bc116de372220096e532afb5cb8Lennart Poettering/* Licensed to the Apache Software Foundation (ASF) under one or more
f757855e81fc0bc116de372220096e532afb5cb8Lennart Poettering * contributor license agreements. See the NOTICE file distributed with
f757855e81fc0bc116de372220096e532afb5cb8Lennart Poettering * this work for additional information regarding copyright ownership.
f757855e81fc0bc116de372220096e532afb5cb8Lennart Poettering * The ASF licenses this file to You under the Apache License, Version 2.0
f757855e81fc0bc116de372220096e532afb5cb8Lennart Poettering * (the "License"); you may not use this file except in compliance with
f757855e81fc0bc116de372220096e532afb5cb8Lennart Poettering * the License. You may obtain a copy of the License at
f757855e81fc0bc116de372220096e532afb5cb8Lennart Poettering * http://www.apache.org/licenses/LICENSE-2.0
f757855e81fc0bc116de372220096e532afb5cb8Lennart Poettering * Unless required by applicable law or agreed to in writing, software
f757855e81fc0bc116de372220096e532afb5cb8Lennart Poettering * distributed under the License is distributed on an "AS IS" BASIS,
f757855e81fc0bc116de372220096e532afb5cb8Lennart Poettering * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
f757855e81fc0bc116de372220096e532afb5cb8Lennart Poettering * See the License for the specific language governing permissions and
f757855e81fc0bc116de372220096e532afb5cb8Lennart Poettering * limitations under the License.
f757855e81fc0bc116de372220096e532afb5cb8Lennart Poettering * 0 or positive: number of idle worker threads
f757855e81fc0bc116de372220096e532afb5cb8Lennart Poettering * negative: number of threads blocked waiting
f757855e81fc0bc116de372220096e532afb5cb8Lennart Poettering * for an idle worker
return APR_SUCCESS;
pool);
return rv;
return rv;
return APR_SUCCESS;
int prev_idlers;
if (prev_idlers < 0) {
AP_DEBUG_ASSERT(0);
return rv;
return rv;
return rv;
return APR_SUCCESS;
int prev_idlers;
if (prev_idlers <= 0) {
AP_DEBUG_ASSERT(0);
return rv;
AP_DEBUG_ASSERT(0);
return rv2;
return rv;
return rv;
return APR_EOF;
return APR_SUCCESS;
if (pool_to_recycle) {
(*new_recycle));
return rv;
#define ap_queue_empty(queue) ((queue)->nelts == 0 && APR_RING_EMPTY(&queue->timers ,timer_event_t, link))
return APR_SUCCESS;
apr_pool_t * a)
a)) != APR_SUCCESS) {
return rv;
return rv;
for (i = 0; i < queue_capacity; ++i)
return APR_SUCCESS;
return rv;
elem->p = p;
return rv;
return APR_SUCCESS;
return rv;
return rv;
return APR_SUCCESS;
return rv;
return rv;
return APR_EINTR;
*p = elem->p;
#ifdef AP_DEBUG
return rv;
return rv;
return rv;
return rv;