/usr/src/redhat/BUILD/httpd-2.2.3/server/mpm/worker/fdqueue.h

説明を見る。
00001 /* Licensed to the Apache Software Foundation (ASF) under one or more
00002  * contributor license agreements.  See the NOTICE file distributed with
00003  * this work for additional information regarding copyright ownership.
00004  * The ASF licenses this file to You under the Apache License, Version 2.0
00005  * (the "License"); you may not use this file except in compliance with
00006  * the License.  You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00025 #ifndef FDQUEUE_H
00026 #define FDQUEUE_H
00027 #include "httpd.h"
00028 #include <stdlib.h>
00029 #if APR_HAVE_UNISTD_H
00030 #include <unistd.h>
00031 #endif
00032 #include <apr_thread_mutex.h>
00033 #include <apr_thread_cond.h>
00034 #include <sys/types.h>
00035 #if APR_HAVE_SYS_SOCKET_H
00036 #include <sys/socket.h>
00037 #endif
00038 #include <apr_errno.h>
00039 
00040 typedef struct fd_queue_info_t fd_queue_info_t;
00041 
00042 apr_status_t ap_queue_info_create(fd_queue_info_t **queue_info,
00043                                   apr_pool_t *pool, int max_idlers);
00044 apr_status_t ap_queue_info_set_idle(fd_queue_info_t *queue_info,
00045                                     apr_pool_t *pool_to_recycle);
00046 apr_status_t ap_queue_info_wait_for_idler(fd_queue_info_t *queue_info,
00047                                           apr_pool_t **recycled_pool);
00048 apr_status_t ap_queue_info_term(fd_queue_info_t *queue_info);
00049 
00050 struct fd_queue_elem_t {
00051     apr_socket_t      *sd;
00052     apr_pool_t        *p;
00053 };
00054 typedef struct fd_queue_elem_t fd_queue_elem_t;
00055 
00056 struct fd_queue_t {
00057     fd_queue_elem_t    *data;
00058     int                 nelts;
00059     int                 bounds;
00060     apr_thread_mutex_t *one_big_mutex;
00061     apr_thread_cond_t  *not_empty;
00062     int                 terminated;
00063 };
00064 typedef struct fd_queue_t fd_queue_t;
00065 
00066 apr_status_t ap_queue_init(fd_queue_t *queue, int queue_capacity, apr_pool_t *a);
00067 apr_status_t ap_queue_push(fd_queue_t *queue, apr_socket_t *sd, apr_pool_t *p);
00068 apr_status_t ap_queue_pop(fd_queue_t *queue, apr_socket_t **sd, apr_pool_t **p);
00069 apr_status_t ap_queue_interrupt_all(fd_queue_t *queue);
00070 apr_status_t ap_queue_term(fd_queue_t *queue);
00071 
00072 #endif /* FDQUEUE_H */
00073 

Apacheに対してSun Jul 19 22:05:23 2009に生成されました。  doxygen 1.4.7