You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by pq...@apache.org on 2005/03/12 01:26:40 UTC

svn commit: r157187 - in apr/apr/branches/1.1.x: CHANGES poll/unix/epoll.c poll/unix/kqueue.c poll/unix/port.c

Author: pquerna
Date: Fri Mar 11 16:26:39 2005
New Revision: 157187

URL: http://svn.apache.org/viewcvs?view=rev&rev=157187
Log:
backport from trunk:
Use APR_RING_CONCAT instead of looping.

Modified:
    apr/apr/branches/1.1.x/CHANGES
    apr/apr/branches/1.1.x/poll/unix/epoll.c
    apr/apr/branches/1.1.x/poll/unix/kqueue.c
    apr/apr/branches/1.1.x/poll/unix/port.c

Modified: apr/apr/branches/1.1.x/CHANGES
URL: http://svn.apache.org/viewcvs/apr/apr/branches/1.1.x/CHANGES?view=diff&r1=157186&r2=157187
==============================================================================
--- apr/apr/branches/1.1.x/CHANGES (original)
+++ apr/apr/branches/1.1.x/CHANGES Fri Mar 11 16:26:39 2005
@@ -1,5 +1,8 @@
 Changes for APR 1.1.1
 
+  *) Use APR_RING_CONCAT for moving dead list in KQueue, sys_epoll, and 
+     Event Ports. [Paul Querna]
+
   *) find_apr.m4: Try installed APR before bundled copy if --with-apr not
      passed to configure.  [Justin Erenkrantz]
 

Modified: apr/apr/branches/1.1.x/poll/unix/epoll.c
URL: http://svn.apache.org/viewcvs/apr/apr/branches/1.1.x/poll/unix/epoll.c?view=diff&r1=157186&r2=157187
==============================================================================
--- apr/apr/branches/1.1.x/poll/unix/epoll.c (original)
+++ apr/apr/branches/1.1.x/poll/unix/epoll.c Fri Mar 11 16:26:39 2005
@@ -256,11 +256,7 @@
     pollset_lock_rings();
 
     /* Shift all PFDs in the Dead Ring to be Free Ring */
-    while (!APR_RING_EMPTY(&(pollset->dead_ring), pfd_elem_t, link)) {
-        ep = APR_RING_FIRST(&(pollset->dead_ring));
-        APR_RING_REMOVE(ep, link);
-        APR_RING_INSERT_TAIL(&(pollset->free_ring), ep, pfd_elem_t, link);
-    }
+    APR_RING_CONCAT(&(pollset->free_ring), &(pollset->dead_ring), pfd_elem_t, link);
 
     pollset_unlock_rings();
 

Modified: apr/apr/branches/1.1.x/poll/unix/kqueue.c
URL: http://svn.apache.org/viewcvs/apr/apr/branches/1.1.x/poll/unix/kqueue.c?view=diff&r1=157186&r2=157187
==============================================================================
--- apr/apr/branches/1.1.x/poll/unix/kqueue.c (original)
+++ apr/apr/branches/1.1.x/poll/unix/kqueue.c Fri Mar 11 16:26:39 2005
@@ -274,11 +274,7 @@
     pollset_lock_rings();
 
     /* Shift all PFDs in the Dead Ring to be Free Ring */
-    while (!APR_RING_EMPTY(&(pollset->dead_ring), pfd_elem_t, link)) {
-        ep = APR_RING_FIRST(&(pollset->dead_ring));
-        APR_RING_REMOVE(ep, link);
-        APR_RING_INSERT_TAIL(&(pollset->free_ring), ep, pfd_elem_t, link);
-    }
+    APR_RING_CONCAT(&(pollset->free_ring), &(pollset->dead_ring), pfd_elem_t, link);
 
     pollset_unlock_rings();
 

Modified: apr/apr/branches/1.1.x/poll/unix/port.c
URL: http://svn.apache.org/viewcvs/apr/apr/branches/1.1.x/poll/unix/port.c?view=diff&r1=157186&r2=157187
==============================================================================
--- apr/apr/branches/1.1.x/poll/unix/port.c (original)
+++ apr/apr/branches/1.1.x/poll/unix/port.c Fri Mar 11 16:26:39 2005
@@ -328,11 +328,7 @@
     pollset_lock_rings();
 
     /* Shift all PFDs in the Dead Ring to be Free Ring */
-    while (!APR_RING_EMPTY(&(pollset->dead_ring), pfd_elem_t, link)) {
-        ep = APR_RING_FIRST(&(pollset->dead_ring));
-        APR_RING_REMOVE(ep, link);
-        APR_RING_INSERT_TAIL(&(pollset->free_ring), ep, pfd_elem_t, link);
-    }
+    APR_RING_CONCAT(&(pollset->free_ring), &(pollset->dead_ring), pfd_elem_t, link);
 
     pollset_unlock_rings();