summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server/mpm/event/event.c5
-rw-r--r--server/mpm_unix.c15
-rw-r--r--server/mpm_unix.h16
3 files changed, 20 insertions, 16 deletions
diff --git a/server/mpm/event/event.c b/server/mpm/event/event.c
index 55a7e562d5..5ee1ac207a 100644
--- a/server/mpm/event/event.c
+++ b/server/mpm/event/event.c
@@ -220,6 +220,8 @@ static apr_pollfd_t *listener_pollfd;
*/
static apr_pollset_t *event_pollset;
+typedef struct event_conn_state_t event_conn_state_t;
+
/*
* The chain of connections to be shutdown by a worker thread (deferred),
* linked list updated atomically.
@@ -2287,7 +2289,8 @@ static void *APR_THREAD_FUNC worker_thread(apr_thread_t * thd, void *dummy)
break;
}
- rv = ap_queue_pop_something(worker_queue, &csd, &cs, &ptrans, &te);
+ rv = ap_queue_pop_something(worker_queue, &csd, (void **)&cs,
+ &ptrans, &te);
if (rv != APR_SUCCESS) {
/* We get APR_EOF during a graceful shutdown once all the
diff --git a/server/mpm_unix.c b/server/mpm_unix.c
index 2fae89bc4c..bc35f76359 100644
--- a/server/mpm_unix.c
+++ b/server/mpm_unix.c
@@ -1136,6 +1136,13 @@ struct fd_queue_info_t
struct recycled_pool *volatile recycled_pools;
};
+struct fd_queue_elem_t
+{
+ apr_socket_t *sd;
+ apr_pool_t *p;
+ void *baton;
+};
+
static apr_status_t queue_info_cleanup(void *data_)
{
fd_queue_info_t *qi = data_;
@@ -1469,7 +1476,7 @@ apr_status_t ap_queue_init(fd_queue_t * queue, int queue_capacity,
* to reserve an idle worker thread
*/
apr_status_t ap_queue_push(fd_queue_t * queue, apr_socket_t * sd,
- event_conn_state_t * ecs, apr_pool_t * p)
+ void * baton, apr_pool_t * p)
{
fd_queue_elem_t *elem;
apr_status_t rv;
@@ -1486,7 +1493,7 @@ apr_status_t ap_queue_push(fd_queue_t * queue, apr_socket_t * sd,
if (queue->in >= queue->bounds)
queue->in -= queue->bounds;
elem->sd = sd;
- elem->ecs = ecs;
+ elem->baton = baton;
elem->p = p;
queue->nelts++;
@@ -1527,7 +1534,7 @@ apr_status_t ap_queue_push_timer(fd_queue_t * queue, timer_event_t *te)
* 'sd'.
*/
apr_status_t ap_queue_pop_something(fd_queue_t * queue, apr_socket_t ** sd,
- event_conn_state_t ** ecs, apr_pool_t ** p,
+ void ** baton, apr_pool_t ** p,
timer_event_t ** te_out)
{
fd_queue_elem_t *elem;
@@ -1570,7 +1577,7 @@ apr_status_t ap_queue_pop_something(fd_queue_t * queue, apr_socket_t ** sd,
queue->out -= queue->bounds;
queue->nelts--;
*sd = elem->sd;
- *ecs = elem->ecs;
+ *baton = elem->baton;
*p = elem->p;
#ifdef AP_DEBUG
elem->sd = NULL;
diff --git a/server/mpm_unix.h b/server/mpm_unix.h
index 45e0ab1f86..a7e13af33c 100644
--- a/server/mpm_unix.h
+++ b/server/mpm_unix.h
@@ -37,8 +37,10 @@
#include "ap_mpm.h"
+struct fd_queue_info_t; /* opaque */
+struct fd_queue_elem_t; /* opaque */
typedef struct fd_queue_info_t fd_queue_info_t;
-typedef struct event_conn_state_t event_conn_state_t;
+typedef struct fd_queue_elem_t fd_queue_elem_t;
apr_status_t ap_queue_info_create(fd_queue_info_t ** queue_info,
apr_pool_t * pool, int max_idlers,
@@ -52,14 +54,6 @@ apr_status_t ap_queue_info_term(fd_queue_info_t * queue_info);
apr_uint32_t ap_queue_info_get_idlers(fd_queue_info_t * queue_info);
void ap_free_idle_pools(fd_queue_info_t *queue_info);
-struct fd_queue_elem_t
-{
- apr_socket_t *sd;
- apr_pool_t *p;
- event_conn_state_t *ecs;
-};
-typedef struct fd_queue_elem_t fd_queue_elem_t;
-
typedef struct timer_event_t timer_event_t;
struct timer_event_t
@@ -93,10 +87,10 @@ void ap_push_pool(fd_queue_info_t * queue_info,
apr_status_t ap_queue_init(fd_queue_t * queue, int queue_capacity,
apr_pool_t * a);
apr_status_t ap_queue_push(fd_queue_t * queue, apr_socket_t * sd,
- event_conn_state_t * ecs, apr_pool_t * p);
+ void * baton, apr_pool_t * p);
apr_status_t ap_queue_push_timer(fd_queue_t *queue, timer_event_t *te);
apr_status_t ap_queue_pop_something(fd_queue_t * queue, apr_socket_t ** sd,
- event_conn_state_t ** ecs, apr_pool_t ** p,
+ void ** baton, apr_pool_t ** p,
timer_event_t ** te);
apr_status_t ap_queue_interrupt_all(fd_queue_t * queue);
apr_status_t ap_queue_interrupt_one(fd_queue_t * queue);