MCPcopy Create free account
hub / github.com/apache/httpd / h2_workers_register

Function h2_workers_register

modules/http2/h2_workers.c:568–592  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

566}
567
568ap_conn_producer_t *h2_workers_register(h2_workers *workers,
569 apr_pool_t *producer_pool,
570 const char *name,
571 ap_conn_producer_next *fn_next,
572 ap_conn_producer_done *fn_done,
573 ap_conn_producer_shutdown *fn_shutdown,
574 void *baton)
575{
576 ap_conn_producer_t *prod;
577
578 prod = apr_pcalloc(producer_pool, sizeof(*prod));
579 APR_RING_ELEM_INIT(prod, link);
580 prod->name = name;
581 prod->fn_next = fn_next;
582 prod->fn_done = fn_done;
583 prod->fn_shutdown = fn_shutdown;
584 prod->baton = baton;
585
586 apr_thread_mutex_lock(workers->lock);
587 prod->state = PROD_IDLE;
588 APR_RING_INSERT_TAIL(&workers->prod_idle, prod, ap_conn_producer_t, link);
589 apr_thread_mutex_unlock(workers->lock);
590
591 return prod;
592}
593
594apr_status_t h2_workers_join(h2_workers *workers, ap_conn_producer_t *prod)
595{

Callers 1

h2_mplx_c1_createFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected