122 "h2_workers: activate slot %d",
slot->id);
125 slot->should_shutdown = 0;
183 if (
slot->is_idle && !
slot->should_shutdown) {
286 c->id = (
c->master->id << 8)^
slot->id;
288 c->current_thread = thread;
291#if AP_HAS_RESPONSE_BUCKETS
296 slot->prod->fn_done(
slot->prod->baton,
c);
299 if (--
slot->prod->conns_active <= 0) {
329 "h2_workers: idle timeout slot %d in state %d (%d activations)",
340 "h2_workers: terminate slot %d in state %d (%d activations)",
344 slot->should_shutdown = 0;
375 "h2_workers: cleanup %d workers (%d idle)",
400 APLOGNO(10290)
"h2_workers: waiting for workers to close, "
401 "still seeing %d workers (%d idle) living",
407 APLOGNO(10291)
"h2_workers: cleanup, %d workers (%d idle) "
408 "did not exit after %d seconds.",
412 "h2_workers: cleanup all workers terminated");
417 "h2_workers: cleanup zombie workers joined");
423 int max_slots,
int min_active,
466 "h2_workers: created with min=%d max=%d idle_ms=%d",
485 "h2_workers: using stacksize=%ld",
534 "h2_workers: errors initializing");
549 "h2_workers: shutdown graceful=%d",
graceful);
APR Condition Variable Routines.
APR Thread Mutex Routines.
void ap_process_connection(conn_rec *c, void *csd)
apr_socket_t * ap_get_conn_socket(conn_rec *c)
ap_vhost_iterate_conn_cb void * baton
apr_size_t ap_thread_stacksize
#define AP_DEBUG_ASSERT(exp)
const char int apr_pool_t * pool
void const char apr_status_t(* cleanup)(void *))
apr_vformatter_buff_t * c
apr_abortfunc_t apr_allocator_t * allocator
#define apr_pool_create(newpool, parent)
#define apr_pcalloc(p, size)
#define APR_RING_ENTRY(elem)
#define APR_RING_INSERT_TAIL(hp, nep, elem, link)
#define APR_RING_INIT(hp, elem, link)
#define APR_RING_HEAD(head, elem)
#define APR_RING_SENTINEL(hp, elem, link)
#define APR_RING_EMPTY(hp, elem, link)
#define APR_RING_REMOVE(ep, link)
#define APR_RING_FIRST(hp)
#define APR_RING_NEXT(ep, link)
#define APR_RING_ELEM_INIT(ep, link)
#define apr_time_as_msec(time)
#define apr_time_from_sec(sec)
static struct h2_workers * workers
apr_status_t h2_c2_process(conn_rec *c2, apr_thread_t *thread, int worker_id)
static apr_pool_t * pchild
ap_conn_producer_t * h2_workers_register(h2_workers *workers, apr_pool_t *producer_pool, const char *name, ap_conn_producer_next *fn_next, ap_conn_producer_done *fn_done, ap_conn_producer_shutdown *fn_shutdown, void *baton)
apr_uint32_t h2_workers_get_max_workers(h2_workers *workers)
static apr_status_t activate_slot(h2_workers *workers)
apr_status_t h2_workers_activate(h2_workers *workers, ap_conn_producer_t *prod)
apr_status_t h2_workers_join(h2_workers *workers, ap_conn_producer_t *prod)
static apr_status_t workers_pool_cleanup(void *data)
void h2_workers_shutdown(h2_workers *workers, int graceful)
static conn_rec * get_next(h2_slot *slot)
static void join_zombies(h2_workers *workers)
h2_workers * h2_workers_create(server_rec *s, apr_pool_t *pchild, int max_slots, int min_active, apr_time_t idle_limit)
static void wake_idle_worker(h2_workers *workers, ap_conn_producer_t *prod)
static void *APR_THREAD_FUNC slot_run(apr_thread_t *thread, void *wctx)
static void wake_all_idles(h2_workers *workers)
conn_rec * ap_conn_producer_next(void *baton, int *pmore)
void ap_conn_producer_done(void *baton, conn_rec *conn)
void ap_conn_producer_shutdown(void *baton, int graceful)
Apache connection library.
Multi-Processing Modules functions.
apr_status_t apr_thread_exit(apr_thread_t *thd, apr_status_t retval)
apr_status_t apr_thread_join(apr_status_t *retval, apr_thread_t *thd)
apr_status_t apr_threadattr_create(apr_threadattr_t **new, apr_pool_t *pool)
ap_conn_producer_shutdown * fn_shutdown
struct ap_conn_producer_t::@19 link
ap_conn_producer_done * fn_done
volatile prod_state_t state
volatile int conns_active
ap_conn_producer_next * fn_next
Structure to store things which are per connection.
volatile int should_shutdown
ap_conn_producer_t * prod
struct apr_thread_cond_t * more_work
struct h2_workers::ap_conn_producer_idle prod_idle
struct h2_workers::h2_slots_idle idle
struct apr_thread_cond_t * all_done
volatile apr_uint32_t active_slots
struct h2_workers::ap_conn_producer_active prod_active
struct apr_thread_mutex_t * lock
volatile apr_uint32_t idle_slots
apr_threadattr_t * thread_attr
struct apr_thread_cond_t * prod_done
volatile apr_time_t idle_limit
struct h2_workers::h2_slots_zombie zombie
struct h2_workers::h2_slots_busy busy
struct h2_workers::h2_slots_free free
A structure to store information for each virtual server.