summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan@13f79535-47bb-0310-9956-ffa450edef68>2022-01-19 16:41:59 +0000
committerivan <ivan@13f79535-47bb-0310-9956-ffa450edef68>2022-01-19 16:41:59 +0000
commitc8e6366ade86a87c5e37b2f032a77c1fc11c9b54 (patch)
treef230048f85a0484fbcd65959101b0f9e609963fd
parent702c6031338f7e1af5eb44f457c66e15bb2a99e7 (diff)
downloadlibapr-c8e6366ade86a87c5e37b2f032a77c1fc11c9b54.tar.gz
On 'win32-pollset-wakeup-no-file-socket-emulation' branch:
Windows: For the pollset wakeup, use apr_socket_t directly instead of using a socket disguised as an apr_file_t. * file_io/win32/pipe.c (): Include apr_arch_networkio.h. (socket_pipe_cleanup, apr_file_socket_pipe_create, apr_file_socket_pipe_close): Update to use apr_socket_t instead of apr_file_t. * include/arch/unix/apr_arch_poll_private.h (WAKEUP_USES_PIPE): New #define to specify mechanism used for pollset wakeup. (apr_pollset_t, apr_pollcb_t): Add wakeup_socket if not WAKEUP_USES_PIPE. (apr_poll_create_wakeup_socket, apr_poll_close_wakeup_socket, apr_poll_drain_wakeup_socket): Declare if not WAKEUP_USES_PIPE. * include/arch/win32/apr_arch_file_io.h (apr_file_socket_pipe_create, apr_file_socket_pipe_close): Update to use apr_socket_t instead of apr_file_t. * poll/unix/poll.c (impl_pollset_add): Remove hack that allows apr_file_t even if APR_FILES_AS_SOCKETS == 0. (impl_pollset_poll, impl_pollcb_poll): Use wakeup_pipe or wakeup_socket depending of WAKEUP_USES_PIPE. * poll/unix/pollcb.c (pollcb_cleanup, apr_pollcb_create_ex, apr_pollcb_wakeup): Use wakeup_pipe or wakeup_socket depending of WAKEUP_USES_PIPE. * poll/unix/pollset.c (pollset_cleanup, apr_pollset_create_ex, apr_pollset_wakeup): Use wakeup_pipe or wakeup_socket depending of WAKEUP_USES_PIPE. * poll/unix/select.c (impl_pollset_add): Remove hack that allows apr_file_t even if APR_FILES_AS_SOCKETS == 0. (impl_pollset_poll): Use wakeup_pipe or wakeup_socket depending of WAKEUP_USES_PIPE. * poll/unix/wakeup.c (apr_poll_create_wakeup_pipe): Rename to apr_poll_create_wakeup_socket() on Windows and use apr_socket_t instead of apr_file_t. (apr_poll_close_wakeup_pipe): Rename to apr_poll_close_wakeup_socket() on Windows and use apr_socket_t instead of apr_file_t. (apr_poll_drain_wakeup_socket): New. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/win32-pollset-wakeup-no-file-socket-emulation@1897208 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--file_io/win32/pipe.c59
-rw-r--r--include/arch/unix/apr_arch_poll_private.h23
-rw-r--r--include/arch/win32/apr_arch_file_io.h6
-rw-r--r--poll/unix/poll.c25
-rw-r--r--poll/unix/pollcb.c25
-rw-r--r--poll/unix/pollset.c22
-rw-r--r--poll/unix/select.c35
-rw-r--r--poll/unix/wakeup.c36
8 files changed, 147 insertions, 84 deletions
diff --git a/file_io/win32/pipe.c b/file_io/win32/pipe.c
index 22d186687..fc2933519 100644
--- a/file_io/win32/pipe.c
+++ b/file_io/win32/pipe.c
@@ -15,6 +15,7 @@
*/
#include "apr_arch_file_io.h"
+#include "apr_arch_networkio.h"
#include "apr_file_io.h"
#include "apr_general.h"
#include "apr_strings.h"
@@ -411,53 +412,31 @@ cleanup:
static apr_status_t socket_pipe_cleanup(void *thefile)
{
- apr_file_t *file = thefile;
- if (file->filehand != INVALID_HANDLE_VALUE) {
- shutdown((SOCKET)file->filehand, SD_BOTH);
- closesocket((SOCKET)file->filehand);
- file->filehand = INVALID_HANDLE_VALUE;
+ apr_socket_t *file = thefile;
+ if (file->socketdes != INVALID_SOCKET) {
+ shutdown(file->socketdes, SD_BOTH);
+ closesocket(file->socketdes);
+ file->socketdes = INVALID_SOCKET;
}
return APR_SUCCESS;
}
-apr_status_t apr_file_socket_pipe_create(apr_file_t **in,
- apr_file_t **out,
+apr_status_t apr_file_socket_pipe_create(apr_socket_t **in,
+ apr_socket_t **out,
apr_pool_t *p)
{
apr_status_t rv;
SOCKET rd;
SOCKET wr;
+ *in = NULL;
+ *out = NULL;
+
if ((rv = create_socket_pipe(&rd, &wr)) != APR_SUCCESS) {
return rv;
}
- (*in) = (apr_file_t *)apr_pcalloc(p, sizeof(apr_file_t));
- (*in)->pool = p;
- (*in)->fname = NULL;
- (*in)->ftype = APR_FILETYPE_SOCKET;
- (*in)->timeout = 0; /* read end of the pipe is non-blocking */
- (*in)->ungetchar = -1;
- (*in)->eof_hit = 0;
- (*in)->filePtr = 0;
- (*in)->bufpos = 0;
- (*in)->dataRead = 0;
- (*in)->direction = 0;
- (*in)->pOverlapped = NULL;
- (*in)->filehand = (HANDLE)rd;
-
- (*out) = (apr_file_t *)apr_pcalloc(p, sizeof(apr_file_t));
- (*out)->pool = p;
- (*out)->fname = NULL;
- (*out)->ftype = APR_FILETYPE_SOCKET;
- (*out)->timeout = -1;
- (*out)->ungetchar = -1;
- (*out)->eof_hit = 0;
- (*out)->filePtr = 0;
- (*out)->bufpos = 0;
- (*out)->dataRead = 0;
- (*out)->direction = 0;
- (*out)->pOverlapped = NULL;
- (*out)->filehand = (HANDLE)wr;
+ apr_os_sock_put(in, &rd, p);
+ apr_os_sock_put(out, &wr, p);
apr_pool_cleanup_register(p, (void *)(*in), socket_pipe_cleanup,
apr_pool_cleanup_null);
@@ -467,17 +446,11 @@ apr_status_t apr_file_socket_pipe_create(apr_file_t **in,
return rv;
}
-apr_status_t apr_file_socket_pipe_close(apr_file_t *file)
+apr_status_t apr_file_socket_pipe_close(apr_socket_t *socket)
{
apr_status_t stat;
- if (file->ftype != APR_FILETYPE_SOCKET)
- return apr_file_close(file);
- if ((stat = socket_pipe_cleanup(file)) == APR_SUCCESS) {
- apr_pool_cleanup_kill(file->pool, file, socket_pipe_cleanup);
-
- if (file->mutex) {
- apr_thread_mutex_destroy(file->mutex);
- }
+ if ((stat = socket_pipe_cleanup(socket)) == APR_SUCCESS) {
+ apr_pool_cleanup_kill(socket->pool, socket, socket_pipe_cleanup);
return APR_SUCCESS;
}
diff --git a/include/arch/unix/apr_arch_poll_private.h b/include/arch/unix/apr_arch_poll_private.h
index 8dd97d1ad..7b91963a6 100644
--- a/include/arch/unix/apr_arch_poll_private.h
+++ b/include/arch/unix/apr_arch_poll_private.h
@@ -81,6 +81,12 @@
#endif
#endif
+#ifdef WIN32
+#define WAKEUP_USES_PIPE 0
+#else
+#define WAKEUP_USES_PIPE 1
+#endif
+
#if defined(POLLSET_USES_KQUEUE) || defined(POLLSET_USES_EPOLL) || defined(POLLSET_USES_PORT) || defined(POLLSET_USES_AIO_MSGQ)
#include "apr_ring.h"
@@ -121,7 +127,11 @@ struct apr_pollset_t
apr_uint32_t nalloc;
apr_uint32_t flags;
/* Pipe descriptors used for wakeup */
+#if WAKEUP_USES_PIPE
apr_file_t *wakeup_pipe[2];
+#else
+ apr_socket_t *wakeup_socket[2];
+#endif
apr_pollfd_t wakeup_pfd;
volatile apr_uint32_t wakeup_set;
apr_pollset_private_t *p;
@@ -150,7 +160,11 @@ struct apr_pollcb_t {
apr_uint32_t nalloc;
apr_uint32_t flags;
/* Pipe descriptors used for wakeup */
+#if WAKEUP_USES_PIPE
apr_file_t *wakeup_pipe[2];
+#else
+ apr_socket_t *wakeup_socket[2];
+#endif
apr_pollfd_t wakeup_pfd;
volatile apr_uint32_t wakeup_set;
int fd;
@@ -181,9 +195,16 @@ struct apr_pollcb_provider_t {
* Private functions used for the implementation of both apr_pollcb_* and
* apr_pollset_*
*/
-apr_status_t apr_poll_create_wakeup_pipe(apr_pool_t *pool, apr_pollfd_t *pfd,
+#if WAKEUP_USES_PIPE
+apr_status_t apr_poll_create_wakeup_pipe(apr_pool_t *pool, apr_pollfd_t *pfd,
apr_file_t **wakeup_pipe);
apr_status_t apr_poll_close_wakeup_pipe(apr_file_t **wakeup_pipe);
void apr_poll_drain_wakeup_pipe(volatile apr_uint32_t *wakeup_set, apr_file_t **wakeup_pipe);
+#else
+apr_status_t apr_poll_create_wakeup_socket(apr_pool_t *pool, apr_pollfd_t *pfd,
+ apr_socket_t **wakeup_socket);
+apr_status_t apr_poll_close_wakeup_socket(apr_socket_t **wakeup_socket);
+void apr_poll_drain_wakeup_socket(volatile apr_uint32_t *wakeup_set, apr_socket_t **wakeup_socket);
+#endif
#endif /* APR_ARCH_POLL_PRIVATE_H */
diff --git a/include/arch/win32/apr_arch_file_io.h b/include/arch/win32/apr_arch_file_io.h
index f3ca4feeb..f5d20514b 100644
--- a/include/arch/win32/apr_arch_file_io.h
+++ b/include/arch/win32/apr_arch_file_io.h
@@ -251,11 +251,11 @@ apr_status_t filepath_root_case(char **rootpath, char *root, apr_pool_t *p);
apr_status_t file_cleanup(void *);
extern apr_status_t
-apr_file_socket_pipe_create(apr_file_t **in,
- apr_file_t **out,
+apr_file_socket_pipe_create(apr_socket_t **in,
+ apr_socket_t **out,
apr_pool_t *p);
extern apr_status_t
-apr_file_socket_pipe_close(apr_file_t *file);
+apr_file_socket_pipe_close(apr_socket_t *socket);
#endif /* ! FILE_IO_H */
diff --git a/poll/unix/poll.c b/poll/unix/poll.c
index 07ed79674..e310004e0 100644
--- a/poll/unix/poll.c
+++ b/poll/unix/poll.c
@@ -187,11 +187,7 @@ static apr_status_t impl_pollset_add(apr_pollset_t *pollset,
#if APR_FILES_AS_SOCKETS
pollset->p->pollset[pollset->nelts].fd = descriptor->desc.f->filedes;
#else
- if ((pollset->flags & APR_POLLSET_WAKEABLE) &&
- descriptor->desc.f == pollset->wakeup_pipe[0])
- pollset->p->pollset[pollset->nelts].fd = (SOCKET)descriptor->desc.f->filedes;
- else
- return APR_EBADF;
+ return APR_EBADF;
#endif
}
pollset->p->pollset[pollset->nelts].events =
@@ -272,12 +268,21 @@ static apr_status_t impl_pollset_poll(apr_pollset_t *pollset,
/* Check if the polled descriptor is our
* wakeup pipe. In that case do not put it result set.
*/
+#if WAKEUP_USES_PIPE
if ((pollset->flags & APR_POLLSET_WAKEABLE) &&
pollset->p->query_set[i].desc_type == APR_POLL_FILE &&
pollset->p->query_set[i].desc.f == pollset->wakeup_pipe[0]) {
apr_poll_drain_wakeup_pipe(&pollset->wakeup_set, pollset->wakeup_pipe);
rv = APR_EINTR;
}
+#else
+ if ((pollset->flags & APR_POLLSET_WAKEABLE) &&
+ pollset->p->query_set[i].desc_type == APR_POLL_SOCKET &&
+ pollset->p->query_set[i].desc.s == pollset->wakeup_socket[0]) {
+ apr_poll_drain_wakeup_socket(&pollset->wakeup_set, pollset->wakeup_socket);
+ rv = APR_EINTR;
+ }
+#endif
else {
pollset->p->result_set[j] = pollset->p->query_set[i];
pollset->p->result_set[j].rtnevents =
@@ -419,13 +424,21 @@ static apr_status_t impl_pollcb_poll(apr_pollcb_t *pollcb,
if (pollcb->pollset.ps[i].revents != 0) {
apr_pollfd_t *pollfd = pollcb->copyset[i];
+#if WAKEUP_USES_PIPE
if ((pollcb->flags & APR_POLLSET_WAKEABLE) &&
pollfd->desc_type == APR_POLL_FILE &&
pollfd->desc.f == pollcb->wakeup_pipe[0]) {
apr_poll_drain_wakeup_pipe(&pollcb->wakeup_set, pollcb->wakeup_pipe);
return APR_EINTR;
}
-
+#else
+ if ((pollcb->flags & APR_POLLSET_WAKEABLE) &&
+ pollfd->desc_type == APR_POLL_SOCKET &&
+ pollfd->desc.s == pollcb->wakeup_socket[0]) {
+ apr_poll_drain_wakeup_socket(&pollcb->wakeup_set, pollcb->wakeup_socket);
+ return APR_EINTR;
+ }
+#endif
pollfd->rtnevents = get_revent(pollcb->pollset.ps[i].revents);
rv = func(baton, pollfd);
if (rv) {
diff --git a/poll/unix/pollcb.c b/poll/unix/pollcb.c
index 103ab9fa6..144669629 100644
--- a/poll/unix/pollcb.c
+++ b/poll/unix/pollcb.c
@@ -82,7 +82,11 @@ static apr_status_t pollcb_cleanup(void *p)
(*pollcb->provider->cleanup)(pollcb);
}
if (pollcb->flags & APR_POLLSET_WAKEABLE) {
+#if WAKEUP_USES_PIPE
apr_poll_close_wakeup_pipe(pollcb->wakeup_pipe);
+#else
+ apr_poll_close_wakeup_socket(pollcb->wakeup_socket);
+#endif
}
return APR_SUCCESS;
@@ -163,12 +167,21 @@ APR_DECLARE(apr_status_t) apr_pollcb_create_ex(apr_pollcb_t **ret_pollcb,
}
if (flags & APR_POLLSET_WAKEABLE) {
+#if WAKEUP_USES_PIPE
/* Create wakeup pipe */
if ((rv = apr_poll_create_wakeup_pipe(pollcb->pool, &pollcb->wakeup_pfd,
- pollcb->wakeup_pipe))
- != APR_SUCCESS) {
+ pollcb->wakeup_pipe))
+ != APR_SUCCESS) {
+ return rv;
+ }
+#else
+ /* Create wakeup socket */
+ if ((rv = apr_poll_create_wakeup_socket(pollcb->pool, &pollcb->wakeup_pfd,
+ pollcb->wakeup_socket))
+ != APR_SUCCESS) {
return rv;
}
+#endif
if ((rv = apr_pollcb_add(pollcb, &pollcb->wakeup_pfd)) != APR_SUCCESS) {
return rv;
@@ -217,8 +230,14 @@ APR_DECLARE(apr_status_t) apr_pollcb_wakeup(apr_pollcb_t *pollcb)
if (!(pollcb->flags & APR_POLLSET_WAKEABLE))
return APR_EINIT;
- if (apr_atomic_cas32(&pollcb->wakeup_set, 1, 0) == 0)
+ if (apr_atomic_cas32(&pollcb->wakeup_set, 1, 0) == 0) {
+#if WAKEUP_USES_PIPE
return apr_file_putc(1, pollcb->wakeup_pipe[1]);
+#else
+ apr_size_t len = 1;
+ return apr_socket_send(pollcb->wakeup_socket[1], "\1", &len);
+#endif
+ }
return APR_SUCCESS;
}
diff --git a/poll/unix/pollset.c b/poll/unix/pollset.c
index 630bd4a57..8db5ef0e4 100644
--- a/poll/unix/pollset.c
+++ b/poll/unix/pollset.c
@@ -38,7 +38,11 @@ static apr_status_t pollset_cleanup(void *p)
(*pollset->provider->cleanup)(pollset);
}
if (pollset->flags & APR_POLLSET_WAKEABLE) {
+#if WAKEUP_USES_PIPE
apr_poll_close_wakeup_pipe(pollset->wakeup_pipe);
+#else
+ apr_poll_close_wakeup_socket(pollset->wakeup_socket);
+#endif
}
return APR_SUCCESS;
@@ -162,13 +166,21 @@ APR_DECLARE(apr_status_t) apr_pollset_create_ex(apr_pollset_t **ret_pollset,
return rv;
}
if (flags & APR_POLLSET_WAKEABLE) {
+#if WAKEUP_USES_PIPE
/* Create wakeup pipe */
if ((rv = apr_poll_create_wakeup_pipe(pollset->pool, &pollset->wakeup_pfd,
pollset->wakeup_pipe))
!= APR_SUCCESS) {
return rv;
}
-
+#else
+ /* Create wakeup socket */
+ if ((rv = apr_poll_create_wakeup_socket(pollset->pool, &pollset->wakeup_pfd,
+ pollset->wakeup_socket))
+ != APR_SUCCESS) {
+ return rv;
+ }
+#endif
if ((rv = apr_pollset_add(pollset, &pollset->wakeup_pfd)) != APR_SUCCESS) {
return rv;
}
@@ -221,8 +233,14 @@ APR_DECLARE(apr_status_t) apr_pollset_wakeup(apr_pollset_t *pollset)
if (!(pollset->flags & APR_POLLSET_WAKEABLE))
return APR_EINIT;
- if (apr_atomic_cas32(&pollset->wakeup_set, 1, 0) == 0)
+ if (apr_atomic_cas32(&pollset->wakeup_set, 1, 0) == 0) {
+#if WAKEUP_USES_PIPE
return apr_file_putc(1, pollset->wakeup_pipe[1]);
+#else
+ apr_size_t len = 1;
+ return apr_socket_send(pollset->wakeup_socket[1], "\1", &len);
+#endif
+ }
return APR_SUCCESS;
}
diff --git a/poll/unix/select.c b/poll/unix/select.c
index f2c1a1328..562ced7f6 100644
--- a/poll/unix/select.c
+++ b/poll/unix/select.c
@@ -248,11 +248,7 @@ static apr_status_t impl_pollset_add(apr_pollset_t *pollset,
}
else {
#if !APR_FILES_AS_SOCKETS
- if ((pollset->flags & APR_POLLSET_WAKEABLE) &&
- descriptor->desc.f == pollset->wakeup_pipe[0])
- fd = (apr_os_sock_t)descriptor->desc.f->filedes;
- else
- return APR_EBADF;
+ return APR_EBADF;
#else
#ifdef NETWARE
/* NetWare can't handle mixed descriptor types in select() */
@@ -395,23 +391,34 @@ static apr_status_t impl_pollset_poll(apr_pollset_t *pollset,
j = 0;
for (i = 0; i < pollset->nelts; i++) {
apr_os_sock_t fd;
- if (pollset->p->query_set[i].desc_type == APR_POLL_SOCKET) {
- fd = pollset->p->query_set[i].desc.s->socketdes;
- }
- else {
- if ((pollset->flags & APR_POLLSET_WAKEABLE) &&
+
+ if (pollset->flags & APR_POLLSET_WAKEABLE) {
+#if WAKEUP_USES_PIPE
+ if (pollset->p->query_set[i].desc_type == APR_POLL_FILE &&
pollset->p->query_set[i].desc.f == pollset->wakeup_pipe[0]) {
apr_poll_drain_wakeup_pipe(&pollset->wakeup_set, pollset->wakeup_pipe);
rv = APR_EINTR;
continue;
}
- else {
+#else
+ if (pollset->p->query_set[i].desc_type == APR_POLL_SOCKET &&
+ pollset->p->query_set[i].desc.s == pollset->wakeup_socket[0]) {
+ apr_poll_drain_wakeup_socket(&pollset->wakeup_set, pollset->wakeup_socket);
+ rv = APR_EINTR;
+ continue;
+ }
+#endif
+ }
+
+ if (pollset->p->query_set[i].desc_type == APR_POLL_SOCKET) {
+ fd = pollset->p->query_set[i].desc.s->socketdes;
+ }
+ else {
#if !APR_FILES_AS_SOCKETS
- return APR_EBADF;
+ return APR_EBADF;
#else
- fd = pollset->p->query_set[i].desc.f->filedes;
+ fd = pollset->p->query_set[i].desc.f->filedes;
#endif
- }
}
if (FD_ISSET(fd, &readset) || FD_ISSET(fd, &writeset) ||
FD_ISSET(fd, &exceptset)) {
diff --git a/poll/unix/wakeup.c b/poll/unix/wakeup.c
index b7e9efd45..e2deea172 100644
--- a/poll/unix/wakeup.c
+++ b/poll/unix/wakeup.c
@@ -28,34 +28,34 @@
#ifdef WIN32
-apr_status_t apr_poll_create_wakeup_pipe(apr_pool_t *pool, apr_pollfd_t *pfd,
- apr_file_t **wakeup_pipe)
+apr_status_t apr_poll_create_wakeup_socket(apr_pool_t *pool, apr_pollfd_t *pfd,
+ apr_socket_t **wakeup_socket)
{
apr_status_t rv;
- if ((rv = apr_file_socket_pipe_create(&wakeup_pipe[0], &wakeup_pipe[1],
+ if ((rv = apr_file_socket_pipe_create(&wakeup_socket[0], &wakeup_socket[1],
pool)) != APR_SUCCESS)
return rv;
pfd->reqevents = APR_POLLIN;
- pfd->desc_type = APR_POLL_FILE;
- pfd->desc.f = wakeup_pipe[0];
+ pfd->desc_type = APR_POLL_SOCKET;
+ pfd->desc.s = wakeup_socket[0];
return APR_SUCCESS;
}
-apr_status_t apr_poll_close_wakeup_pipe(apr_file_t **wakeup_pipe)
+apr_status_t apr_poll_close_wakeup_socket(apr_socket_t **wakeup_socket)
{
apr_status_t rv0 = APR_SUCCESS;
apr_status_t rv1 = APR_SUCCESS;
/* Close both sides of the wakeup pipe */
- if (wakeup_pipe[0]) {
- rv0 = apr_file_socket_pipe_close(wakeup_pipe[0]);
- wakeup_pipe[0] = NULL;
+ if (wakeup_socket[0]) {
+ rv0 = apr_file_socket_pipe_close(wakeup_socket[0]);
+ wakeup_socket[0] = NULL;
}
- if (wakeup_pipe[1]) {
- rv1 = apr_file_socket_pipe_close(wakeup_pipe[1]);
- wakeup_pipe[1] = NULL;
+ if (wakeup_socket[1]) {
+ rv1 = apr_file_socket_pipe_close(wakeup_socket[1]);
+ wakeup_socket[1] = NULL;
}
return rv0 ? rv0 : rv1;
}
@@ -134,6 +134,7 @@ apr_status_t apr_poll_close_wakeup_pipe(apr_file_t **wakeup_pipe)
#endif /* APR_FILES_AS_SOCKETS */
+#if WAKEUP_USES_PIPE
/* Read and discard whatever is in the wakeup pipe.
*/
void apr_poll_drain_wakeup_pipe(volatile apr_uint32_t *wakeup_set, apr_file_t **wakeup_pipe)
@@ -143,4 +144,15 @@ void apr_poll_drain_wakeup_pipe(volatile apr_uint32_t *wakeup_set, apr_file_t **
(void)apr_file_getc(&ch, wakeup_pipe[0]);
apr_atomic_set32(wakeup_set, 0);
}
+#else
+/* Read and discard whatever is in the wakeup socket.
+ */
+void apr_poll_drain_wakeup_socket(volatile apr_uint32_t *wakeup_set, apr_socket_t **wakeup_socket)
+{
+ char ch;
+ apr_size_t len;
+ (void)apr_socket_recv(wakeup_socket[0], &ch, &len);
+ apr_atomic_set32(wakeup_set, 0);
+}
+#endif \ No newline at end of file