17 #ifndef APR_ARCH_POLL_PRIVATE_H 18 #define APR_ARCH_POLL_PRIVATE_H 28 #ifdef HAVE_PORT_CREATE 30 #include <sys/port_impl.h> 34 #include <sys/types.h> 35 #include <sys/event.h> 40 #include <sys/epoll.h> 44 #define HAS_SOCKETS(dt) (dt == APR_POLL_SOCKET) ? 1 : 0 45 #define HAS_PIPES(dt) (dt == APR_POLL_FILE) ? 1 : 0 48 #if defined(HAVE_AIO_H) && defined(HAVE_AIO_MSGQ) 55 #define POLLSET_USES_KQUEUE 56 #define POLLSET_DEFAULT_METHOD APR_POLLSET_KQUEUE 57 #elif defined(HAVE_PORT_CREATE) 58 #define POLLSET_USES_PORT 59 #define POLLSET_DEFAULT_METHOD APR_POLLSET_PORT 60 #elif defined(HAVE_EPOLL) 61 #define POLLSET_USES_EPOLL 62 #define POLLSET_DEFAULT_METHOD APR_POLLSET_EPOLL 63 #elif defined(HAVE_AIO_MSGQ) 64 #define POLLSET_USES_AIO_MSGQ 65 #define POLLSET_DEFAULT_METHOD APR_POLLSET_AIO_MSGQ 66 #elif defined(HAVE_POLL) 67 #define POLLSET_USES_POLL 68 #define POLLSET_DEFAULT_METHOD APR_POLLSET_POLL 70 #define POLLSET_USES_SELECT 71 #define POLLSET_DEFAULT_METHOD APR_POLLSET_SELECT 75 #define POLL_USES_SELECT 76 #undef POLLSET_DEFAULT_METHOD 77 #define POLLSET_DEFAULT_METHOD APR_POLLSET_SELECT 80 #define POLL_USES_POLL 82 #define POLL_USES_SELECT 86 #if defined(POLLSET_USES_KQUEUE) || defined(POLLSET_USES_EPOLL) || defined(POLLSET_USES_PORT) || defined(POLLSET_USES_AIO_MSGQ) 92 #define pollset_lock_rings() \ 93 if (pollset->flags & APR_POLLSET_THREADSAFE) \ 94 apr_thread_mutex_lock(pollset->p->ring_lock); 95 #define pollset_unlock_rings() \ 96 if (pollset->flags & APR_POLLSET_THREADSAFE) \ 97 apr_thread_mutex_unlock(pollset->p->ring_lock); 99 #define pollset_lock_rings() 100 #define pollset_unlock_rings() 103 typedef struct pfd_elem_t pfd_elem_t;
108 #ifdef HAVE_PORT_CREATE 133 #if defined(HAVE_EPOLL) 134 struct epoll_event *epoll;
136 #if defined(HAVE_PORT_CREATE) 139 #if defined(HAVE_KQUEUE) 142 #if defined(HAVE_POLL) apr_status_t apr_poll_close_wakeup_pipe(apr_file_t **wakeup_pipe)
apr_pollfd_t wakeup_pfd
Definition: apr_arch_poll_private.h:127
const char * name
Definition: apr_arch_poll_private.h:168
Definition: apr_arch_file_io.h:107
apr_bucket_brigade request_rec apr_pool_t * pool
Definition: mod_dav.h:555
apr_pollfd_t ** copyset
Definition: apr_arch_poll_private.h:158
void * undef
Definition: apr_arch_poll_private.h:145
apr_status_t apr_poll_create_wakeup_pipe(apr_pool_t *pool, apr_pollfd_t *pfd, apr_file_t **wakeup_pipe)
apr_uint32_t nalloc
Definition: apr_arch_poll_private.h:151
apr_pool_t * pool
Definition: apr_arch_poll_private.h:121
struct apr_pollset_private_t apr_pollset_private_t
Definition: apr_arch_poll_private.h:115
APR Thread Mutex Routines.
apr_int64_t apr_interval_time_t
Definition: apr_time.h:55
apr_pool_t * pool
Definition: apr_arch_poll_private.h:149
Definition: apr_poll.h:117
Definition: apr_arch_poll_private.h:148
apr_uint32_t nelts
Definition: apr_arch_poll_private.h:122
int fd
Definition: apr_arch_poll_private.h:156
apr_uint32_t nelts
Definition: apr_arch_poll_private.h:150
apr_status_t(* apr_pollcb_cb_t)(void *baton, apr_pollfd_t *descriptor)
Definition: apr_poll.h:410
Definition: apr_arch_poll_private.h:171
Definition: apr_arch_poll_private.h:132
Definition: apr_arch_poll_private.h:162
apr_uint32_t flags
Definition: apr_arch_poll_private.h:152
void apr_poll_drain_wakeup_pipe(apr_file_t **wakeup_pipe)
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
const apr_pollset_provider_t * provider
Definition: apr_arch_poll_private.h:129
int apr_status_t
Definition: apr_errno.h:44
apr_uint32_t nalloc
Definition: apr_arch_poll_private.h:123
apr_pollset_private_t * p
Definition: apr_arch_poll_private.h:128
#define APR_RING_ENTRY(elem)
Definition: apr_ring.h:70
apr_pollfd_t wakeup_pfd
Definition: apr_arch_poll_private.h:155
apr_uint32_t flags
Definition: apr_arch_poll_private.h:124
apr_pollcb_pset pollset
Definition: apr_arch_poll_private.h:157
const char * name
Definition: apr_arch_poll_private.h:177
const apr_pollcb_provider_t * provider
Definition: apr_arch_poll_private.h:159
Definition: apr_arch_poll_private.h:119