/usr/src/redhat/BUILD/httpd-2.2.3/server/mpm/experimental/event/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_status_t ap_queue_info_term(fd_queue_info_t * queue_info);
00048 
00049 struct fd_queue_elem_t
00050 {
00051     apr_socket_t *sd;
00052     apr_pool_t *p;
00053     conn_state_t *cs;
00054 };
00055 typedef struct fd_queue_elem_t fd_queue_elem_t;
00056 
00057 struct fd_queue_t
00058 {
00059     fd_queue_elem_t *data;
00060     int nelts;
00061     int bounds;
00062     apr_thread_mutex_t *one_big_mutex;
00063     apr_thread_cond_t *not_empty;
00064     int terminated;
00065 };
00066 typedef struct fd_queue_t fd_queue_t;
00067 
00068 void ap_pop_pool(apr_pool_t ** recycled_pool, fd_queue_info_t * queue_info);
00069 void ap_push_pool(fd_queue_info_t * queue_info,          
00070                                     apr_pool_t * pool_to_recycle);
00071 
00072 apr_status_t ap_queue_init(fd_queue_t * queue, int queue_capacity,
00073                            apr_pool_t * a);
00074 apr_status_t ap_queue_push(fd_queue_t * queue, apr_socket_t * sd,
00075                            conn_state_t * cs, apr_pool_t * p);
00076 apr_status_t ap_queue_pop(fd_queue_t * queue, apr_socket_t ** sd,
00077                           conn_state_t ** cs, apr_pool_t ** p);
00078 apr_status_t ap_queue_interrupt_all(fd_queue_t * queue);
00079 apr_status_t ap_queue_term(fd_queue_t * queue);
00080 
00081 #endif /* FDQUEUE_H */
00082 

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