diff options
author | gregames <gregames@13f79535-47bb-0310-9956-ffa450edef68> | 2007-01-26 20:04:26 +0000 |
---|---|---|
committer | gregames <gregames@13f79535-47bb-0310-9956-ffa450edef68> | 2007-01-26 20:04:26 +0000 |
commit | a2ff375d8e3a00731a693e2b1cbd5e2ff428d246 (patch) | |
tree | e627cd38c746b9559d76469115388e0dbc2cf289 /poll/unix/epoll.c | |
parent | 902a5f25e92bfcd72560e9f3fb3cade98a544093 (diff) | |
download | libapr-a2ff375d8e3a00731a693e2b1cbd5e2ff428d246.tar.gz |
apr_pollset_remove: speed up the httpd Event MPM when lots of connections are
in use
epoll/Linux only for now. ./buildconf on FreeBSD (minotaur) spewed tons of
errors; hints appreciated
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@500321 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poll/unix/epoll.c')
-rw-r--r-- | poll/unix/epoll.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/poll/unix/epoll.c b/poll/unix/epoll.c index d1919a5eb..803612b6c 100644 --- a/poll/unix/epoll.c +++ b/poll/unix/epoll.c @@ -219,18 +219,10 @@ APR_DECLARE(apr_status_t) apr_pollset_remove(apr_pollset_t *pollset, pollset_lock_rings(); if (!APR_RING_EMPTY(&(pollset->query_ring), pfd_elem_t, link)) { - for (ep = APR_RING_FIRST(&(pollset->query_ring)); - ep != APR_RING_SENTINEL(&(pollset->query_ring), - pfd_elem_t, link); - ep = APR_RING_NEXT(ep, link)) { + ep = (pfd_elem_t *) descriptor; - if (descriptor->desc.s == ep->pfd.desc.s) { - APR_RING_REMOVE(ep, link); - APR_RING_INSERT_TAIL(&(pollset->dead_ring), - ep, pfd_elem_t, link); - break; - } - } + APR_RING_REMOVE(ep, link); + APR_RING_INSERT_TAIL(&(pollset->dead_ring), ep, pfd_elem_t, link); } pollset_unlock_rings(); |