apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r748953 - /apr/apr/trunk/poll/unix/kqueue.c
Date Sun, 01 Mar 2009 02:57:10 GMT
Author: trawick
Date: Sun Mar  1 02:57:09 2009
New Revision: 748953

URL: http://svn.apache.org/viewvc?rev=748953&view=rev
Log:
revert a non-critical part of 748951: the needless use of separate temporary kevent
structures for POLLIN vs. POLLOUT

Modified:
    apr/apr/trunk/poll/unix/kqueue.c

Modified: apr/apr/trunk/poll/unix/kqueue.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/poll/unix/kqueue.c?rev=748953&r1=748952&r2=748953&view=diff
==============================================================================
--- apr/apr/trunk/poll/unix/kqueue.c (original)
+++ apr/apr/trunk/poll/unix/kqueue.c Sun Mar  1 02:57:09 2009
@@ -44,8 +44,7 @@
 struct apr_pollset_private_t
 {
     int kqueue_fd;
-    struct kevent in_kevent;
-    struct kevent out_kevent;
+    struct kevent kevent;
     apr_uint32_t setsize;
     struct kevent *ke_set;
     apr_pollfd_t *result_set;
@@ -157,18 +156,18 @@
     }
 
     if (descriptor->reqevents & APR_POLLIN) {
-        EV_SET(&pollset->p->in_kevent, fd, EVFILT_READ, EV_ADD, 0, 0, elem);
+        EV_SET(&pollset->p->kevent, fd, EVFILT_READ, EV_ADD, 0, 0, elem);
 
-        if (kevent(pollset->p->kqueue_fd, &pollset->p->in_kevent, 1, NULL,
0,
+        if (kevent(pollset->p->kqueue_fd, &pollset->p->kevent, 1, NULL, 0,
                    NULL) == -1) {
             rv = apr_get_netos_error();
         }
     }
 
     if (descriptor->reqevents & APR_POLLOUT && rv == APR_SUCCESS) {
-        EV_SET(&pollset->p->out_kevent, fd, EVFILT_WRITE, EV_ADD, 0, 0, elem);
+        EV_SET(&pollset->p->kevent, fd, EVFILT_WRITE, EV_ADD, 0, 0, elem);
 
-        if (kevent(pollset->p->kqueue_fd, &pollset->p->out_kevent, 1, NULL,
0,
+        if (kevent(pollset->p->kqueue_fd, &pollset->p->kevent, 1, NULL, 0,
                    NULL) == -1) {
             rv = apr_get_netos_error();
         }
@@ -204,18 +203,18 @@
     }
 
     if (descriptor->reqevents & APR_POLLIN) {
-        EV_SET(&pollset->p->in_kevent, fd, EVFILT_READ, EV_DELETE, 0, 0, NULL);
+        EV_SET(&pollset->p->kevent, fd, EVFILT_READ, EV_DELETE, 0, 0, NULL);
 
-        if (kevent(pollset->p->kqueue_fd, &pollset->p->in_kevent, 1, NULL,
0,
+        if (kevent(pollset->p->kqueue_fd, &pollset->p->kevent, 1, NULL, 0,
                    NULL) == -1) {
             rv = APR_NOTFOUND;
         }
     }
 
     if (descriptor->reqevents & APR_POLLOUT && rv == APR_SUCCESS) {
-        EV_SET(&pollset->p->out_kevent, fd, EVFILT_WRITE, EV_DELETE, 0, 0, NULL);
+        EV_SET(&pollset->p->kevent, fd, EVFILT_WRITE, EV_DELETE, 0, 0, NULL);
 
-        if (kevent(pollset->p->kqueue_fd, &pollset->p->out_kevent, 1, NULL,
0,
+        if (kevent(pollset->p->kqueue_fd, &pollset->p->kevent, 1, NULL, 0,
                    NULL) == -1) {
             rv = APR_NOTFOUND;
         }



Mime
View raw message