summaryrefslogtreecommitdiff
path: root/include/apr_poll.h
diff options
context:
space:
mode:
authorPaul Querna <pquerna@apache.org>2007-02-19 00:31:01 +0000
committerPaul Querna <pquerna@apache.org>2007-02-19 00:31:01 +0000
commitdc592bfdde071e2b7c419a4be84f35b0c3861f6d (patch)
tree48228c0107026bbf0fefb558e208827d0bccf3d0 /include/apr_poll.h
parent5f119205ebe97b2eca3e195f6c8c7a00e6f9b73f (diff)
downloadapr-dc592bfdde071e2b7c419a4be84f35b0c3861f6d.tar.gz
Add the apr_pollcb API.
This was mostly sitting in the pollcb-dev branch for several months at: <https://svn.apache.org/repos/asf/apr/apr/branches/pollcb-dev/> This commit has small improvements over the branch, and also includes a KQueue backend. This will likely break trunk for operating systems were we only have select|poll, so we will need to add some autoconf foo to define a HAVE_APR_POLLCB unless someone can implement apr_pollcb for all platforms. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@509038 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/apr_poll.h')
-rw-r--r--include/apr_poll.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/apr_poll.h b/include/apr_poll.h
index 328c1229f..871b13705 100644
--- a/include/apr_poll.h
+++ b/include/apr_poll.h
@@ -188,7 +188,27 @@ APR_DECLARE(apr_status_t) apr_poll(apr_pollfd_t *aprset, apr_int32_t numsock,
/** @} */
+/** Opaque structure used for pollset API */
+typedef struct apr_pollcb_t apr_pollcb_t;
+
+APR_DECLARE(apr_status_t) apr_pollcb_create(apr_pollcb_t **pollcb,
+ apr_uint32_t size,
+ apr_pool_t *pool,
+ apr_uint32_t flags);
+
+
+APR_DECLARE(apr_status_t) apr_pollcb_add(apr_pollcb_t *pollcb,
+ apr_pollfd_t *descriptor);
+
+APR_DECLARE(apr_status_t) apr_pollcb_remove(apr_pollcb_t *pollcb,
+ apr_pollfd_t *descriptor);
+
+typedef apr_status_t(*apr_pollcb_cb_t)(void* baton, apr_pollfd_t *descriptor);
+APR_DECLARE(apr_status_t) apr_pollcb_poll(apr_pollcb_t *pollcb,
+ apr_interval_time_t timeout,
+ apr_pollcb_cb_t func,
+ void *baton);
#ifdef __cplusplus
}
#endif