You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by yl...@apache.org on 2018/01/02 18:09:46 UTC
svn commit: r1819861 - /apr/apr/trunk/poll/unix/port.c
Author: ylavic
Date: Tue Jan 2 18:09:46 2018
New Revision: 1819861
URL: http://svn.apache.org/viewvc?rev=1819861&view=rev
Log:
poll, port: follow up to r1819860.
This test is redundant now, axe it (no functional change).
Modified:
apr/apr/trunk/poll/unix/port.c
Modified: apr/apr/trunk/poll/unix/port.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/poll/unix/port.c?rev=1819861&r1=1819860&r2=1819861&view=diff
==============================================================================
--- apr/apr/trunk/poll/unix/port.c (original)
+++ apr/apr/trunk/poll/unix/port.c Tue Jan 2 18:09:46 2018
@@ -406,38 +406,36 @@ static apr_status_t impl_pollset_poll(ap
pollset_lock_rings();
- if (nget) {
- for (i = 0, j = 0; i < nget; i++) {
- ep = (pfd_elem_t *)pollset->p->port_set[i].portev_user;
- if ((pollset->flags & APR_POLLSET_WAKEABLE) &&
- ep->pfd.desc_type == APR_POLL_FILE &&
- ep->pfd.desc.f == pollset->wakeup_pipe[0]) {
- apr_poll_drain_wakeup_pipe(pollset->wakeup_pipe);
- rv = APR_EINTR;
- }
- else {
- pollset->p->result_set[j] = ep->pfd;
- pollset->p->result_set[j].rtnevents =
- get_revent(pollset->p->port_set[i].portev_events);
- j++;
- }
- /* If the ring element is still on the query ring, move it
- * to the add ring for re-association with the event port
- * later. (It may have already been moved to the dead ring
- * by a call to pollset_remove on another thread.)
- */
- if (ep->on_query_ring) {
- APR_RING_REMOVE(ep, link);
- ep->on_query_ring = 0;
- APR_RING_INSERT_TAIL(&(pollset->p->add_ring), ep,
- pfd_elem_t, link);
- }
+ for (i = 0, j = 0; i < nget; i++) {
+ ep = (pfd_elem_t *)pollset->p->port_set[i].portev_user;
+ if ((pollset->flags & APR_POLLSET_WAKEABLE) &&
+ ep->pfd.desc_type == APR_POLL_FILE &&
+ ep->pfd.desc.f == pollset->wakeup_pipe[0]) {
+ apr_poll_drain_wakeup_pipe(pollset->wakeup_pipe);
+ rv = APR_EINTR;
}
- if ((*num = j)) { /* any event besides wakeup pipe? */
- rv = APR_SUCCESS;
- if (descriptors) {
- *descriptors = pollset->p->result_set;
- }
+ else {
+ pollset->p->result_set[j] = ep->pfd;
+ pollset->p->result_set[j].rtnevents =
+ get_revent(pollset->p->port_set[i].portev_events);
+ j++;
+ }
+ /* If the ring element is still on the query ring, move it
+ * to the add ring for re-association with the event port
+ * later. (It may have already been moved to the dead ring
+ * by a call to pollset_remove on another thread.)
+ */
+ if (ep->on_query_ring) {
+ APR_RING_REMOVE(ep, link);
+ ep->on_query_ring = 0;
+ APR_RING_INSERT_TAIL(&(pollset->p->add_ring), ep,
+ pfd_elem_t, link);
+ }
+ }
+ if ((*num = j)) { /* any event besides wakeup pipe? */
+ rv = APR_SUCCESS;
+ if (descriptors) {
+ *descriptors = pollset->p->result_set;
}
}