17#ifndef APR_ARCH_POLL_PRIVATE_H
18#define APR_ARCH_POLL_PRIVATE_H
26#ifdef HAVE_PORT_CREATE
28#include <sys/port_impl.h>
42#define HAS_SOCKETS(dt) (dt == APR_POLL_SOCKET) ? 1 : 0
43#define HAS_PIPES(dt) (dt == APR_POLL_FILE) ? 1 : 0
46#if defined(HAVE_AIO_H) && defined(HAVE_AIO_MSGQ)
53#define POLLSET_USES_KQUEUE
54#define POLLSET_DEFAULT_METHOD APR_POLLSET_KQUEUE
55#elif defined(HAVE_PORT_CREATE)
56#define POLLSET_USES_PORT
57#define POLLSET_DEFAULT_METHOD APR_POLLSET_PORT
58#elif defined(HAVE_EPOLL)
59#define POLLSET_USES_EPOLL
60#define POLLSET_DEFAULT_METHOD APR_POLLSET_EPOLL
61#elif defined(HAVE_AIO_MSGQ)
62#define POLLSET_USES_AIO_MSGQ
63#define POLLSET_DEFAULT_METHOD APR_POLLSET_AIO_MSGQ
64#elif defined(HAVE_POLL)
65#define POLLSET_USES_POLL
66#define POLLSET_DEFAULT_METHOD APR_POLLSET_POLL
68#define POLLSET_USES_SELECT
69#define POLLSET_DEFAULT_METHOD APR_POLLSET_SELECT
73#define POLL_USES_SELECT
74#undef POLLSET_DEFAULT_METHOD
75#define POLLSET_DEFAULT_METHOD APR_POLLSET_SELECT
80#define POLL_USES_SELECT
84#if defined(POLLSET_USES_KQUEUE) || defined(POLLSET_USES_EPOLL) || defined(POLLSET_USES_PORT) || defined(POLLSET_USES_AIO_MSGQ)
90#define pollset_lock_rings() \
91 if (pollset->flags & APR_POLLSET_THREADSAFE) \
92 apr_thread_mutex_lock(pollset->p->ring_lock);
93#define pollset_unlock_rings() \
94 if (pollset->flags & APR_POLLSET_THREADSAFE) \
95 apr_thread_mutex_unlock(pollset->p->ring_lock);
97#define pollset_lock_rings()
98#define pollset_unlock_rings()
106#ifdef HAVE_PORT_CREATE
131#if defined(HAVE_EPOLL)
134#if defined(HAVE_PORT_CREATE)
137#if defined(HAVE_KQUEUE)
140#if defined(HAVE_POLL)
apr_status_t apr_poll_create_wakeup_pipe(apr_pool_t *pool, apr_pollfd_t *pfd, apr_file_t **wakeup_pipe)
void apr_poll_drain_wakeup_pipe(apr_file_t **wakeup_pipe)
apr_status_t apr_poll_close_wakeup_pipe(apr_file_t **wakeup_pipe)
APR Thread Mutex Routines.
const char server_rec server_rec ** ps
const char apr_port_t port
const char int apr_pool_t * pool
apr_status_t(* apr_pollcb_cb_t)(void *baton, apr_pollfd_t *descriptor)
#define APR_RING_ENTRY(elem)
apr_int64_t apr_interval_time_t
apr_status_t(* remove)(apr_pollcb_t *, apr_pollfd_t *)
apr_status_t(* create)(apr_pollcb_t *, apr_uint32_t, apr_pool_t *, apr_uint32_t)
apr_status_t(* poll)(apr_pollcb_t *, apr_interval_time_t, apr_pollcb_cb_t, void *)
apr_status_t(* cleanup)(apr_pollcb_t *)
apr_status_t(* add)(apr_pollcb_t *, apr_pollfd_t *)
apr_file_t * wakeup_pipe[2]
const apr_pollcb_provider_t * provider
apr_status_t(* add)(apr_pollset_t *, const apr_pollfd_t *)
apr_status_t(* poll)(apr_pollset_t *, apr_interval_time_t, apr_int32_t *, const apr_pollfd_t **)
apr_status_t(* cleanup)(apr_pollset_t *)
apr_status_t(* remove)(apr_pollset_t *, const apr_pollfd_t *)
apr_status_t(* create)(apr_pollset_t *, apr_uint32_t, apr_pool_t *, apr_uint32_t)
apr_file_t * wakeup_pipe[2]
const apr_pollset_provider_t * provider
apr_pollset_private_t * p