Apache2
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
simple_types.h
Go to the documentation of this file.
1 /* Licensed to the Apache Software Foundation (ASF) under one or more
2  * contributor license agreements. See the NOTICE file distributed with
3  * this work for additional information regarding copyright ownership.
4  * The ASF licenses this file to You under the Apache License, Version 2.0
5  * (the "License"); you may not use this file except in compliance with
6  * the License. You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #include "apr.h"
18 #include "apr_pools.h"
19 #include "apr_poll.h"
20 #include "apr_hash.h"
21 #include "apr_ring.h"
22 #include "apr_thread_pool.h"
23 #include "apr_buckets.h"
24 #include "httpd.h"
25 
26 #ifndef APACHE_MPM_SIMPLE_TYPES_H
27 #define APACHE_MPM_SIMPLE_TYPES_H
28 
30 
31 typedef struct
32 {
37 
38 #define SIMPLE_MAX_PROC (500000)
39 #define SIMPLE_DEF_PROC (5)
40 #define SIMPLE_MIN_PROC (1)
41 #define SIMPLE_MAX_THREADS (500000)
42 #define SIMPLE_DEF_THREADS (5)
43 #define SIMPLE_MIN_THREADS (1)
44 
45 typedef void (*simple_timer_cb) (simple_core_t * sc, void *baton);
47  int flags, void *baton);
49  int flags, void *baton);
50 
51 typedef struct simple_sb_t simple_sb_t;
52 
53 typedef enum
54 {
57  /* pqXXXXXX: User IO not defined yet. */
60 
61 typedef enum
62 {
66 
68 {
70  void *baton;
71 };
72 
75 {
79  void *baton;
82 };
83 
86 {
87  /* TODO: More is needed here. */
88  pid_t pid;
89 };
90 
92 {
95 
96  int mpm_state;
98 
102 
104 
105  /* PID -> simple_child_t map */
107 
109 
110  /* List of upcoming timers, sorted by nearest first.
111  */
112  APR_RING_HEAD(simple_timer_ring_t, simple_timer_t) timer_ring;
113 
115 };
116 
118 struct simple_conn_t
119 {
129 };
130 
132 
133 /* Allocates/initializes data retained over the life of the process */
135 
136 #endif /* APACHE_MPM_SIMPLE_TYPES_H */
void * baton
Definition: simple_types.h:79
int mpm_state
Definition: simple_types.h:96
simple_core_t * sc
Definition: simple_types.h:121
Definition: apr_arch_thread_mutex.h:28
void(* simple_io_file_cb)(simple_core_t *sc, apr_socket_t *sock, int flags, void *baton)
Definition: simple_types.h:48
APR Thread Pool Library.
apr_pool_t * pool
Definition: simple_types.h:120
int run_single_process
Definition: simple_types.h:99
apr_bucket_alloc_t * ba
Definition: simple_types.h:123
struct apr_bucket_alloc_t apr_bucket_alloc_t
Definition: apr_buckets.h:123
apr_pool_t * pool
Definition: simple_types.h:80
simple_timer_cb cb
Definition: simple_types.h:78
Definition: simple_types.h:74
apr_pollfd_t pfd
Definition: simple_types.h:126
APR Hash Tables.
Definition: simple_types.h:63
int thread_count
Definition: simple_types.h:34
int max_requests_per_child
Definition: simple_types.h:35
Definition: simple_types.h:64
apr_thread_pool_t * workers
Definition: simple_types.h:114
void(* simple_timer_cb)(simple_core_t *sc, void *baton)
Definition: simple_types.h:45
simple_spawn_type_e
Definition: simple_types.h:61
Definition: simple_types.h:56
APR Poll interface.
apr_thread_mutex_t * mtx
Definition: simple_types.h:94
Structure to store things which are per connection.
Definition: httpd.h:1116
int restart_num
Definition: simple_types.h:97
conn_rec * c
Definition: simple_types.h:124
apr_time_t expires
Definition: simple_types.h:77
simple_core_t * sc
Definition: simple_types.h:81
Definition: simple_types.h:85
apr_int64_t apr_time_t
Definition: apr_time.h:45
APR memory allocation.
HTTP Daemon routines.
pid_t pid
Definition: simple_types.h:88
Definition: apr_poll.h:117
APR_RING_HEAD(simple_timer_ring_t, simple_timer_t) timer_ring
apr_pollcb_t * pollcb
Definition: simple_types.h:108
simple_core_t * simple_core_get(void)
A structure to contain connection state information.
Definition: httpd.h:1268
Definition: apr_arch_networkio.h:37
APR-UTIL Buckets/Bucket Brigades.
apr_hash_t * children
Definition: simple_types.h:106
Definition: apr_arch_poll_private.h:148
APR Platform Definitions.
int run_foreground
Definition: simple_types.h:100
void * baton
Definition: simple_types.h:70
struct apr_hash_t apr_hash_t
Definition: apr_hash.h:52
int proc_count
Definition: simple_types.h:33
void(* simple_io_sock_cb)(simple_core_t *sc, apr_socket_t *sock, int flags, void *baton)
Definition: simple_types.h:46
apr_status_t simple_core_init_once(void)
conn_state_t cs
Definition: simple_types.h:128
Definition: simple_types.h:118
APR_RING_ENTRY(simple_timer_t) link
struct apr_thread_pool apr_thread_pool_t
Definition: apr_thread_pool.h:58
Definition: simple_types.h:55
simple_spawn_type_e spawn_via
Definition: simple_types.h:101
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
typedef void(APR_THREAD_FUNC *PFN_HSE_IO_COMPLETION)(EXTENSION_CONTROL_BLOCK *ecb
int apr_status_t
Definition: apr_errno.h:44
apr_socket_t * sock
Definition: simple_types.h:122
Definition: simple_types.h:31
simple_poll_type_e
Definition: simple_types.h:53
Definition: simple_types.h:91
dav_resource int dav_locktoken dav_response int flags
Definition: mod_dav.h:1346
apr_pool_t * pool
Definition: simple_types.h:93
simple_proc_mgr_t procmgr
Definition: simple_types.h:103
Definition: simple_types.h:67
Definition: simple_types.h:58
APR Rings.
simple_poll_type_e type
Definition: simple_types.h:69