commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r1139273 - /commons/sandbox/runtime/trunk/src/main/native/os/linux/epoll.c
Date Fri, 24 Jun 2011 12:36:59 GMT
Author: mturk
Date: Fri Jun 24 12:36:59 2011
New Revision: 1139273

URL: http://svn.apache.org/viewvc?rev=1139273&view=rev
Log:
Use common variable names

Modified:
    commons/sandbox/runtime/trunk/src/main/native/os/linux/epoll.c

Modified: commons/sandbox/runtime/trunk/src/main/native/os/linux/epoll.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/linux/epoll.c?rev=1139273&r1=1139272&r2=1139273&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/linux/epoll.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/linux/epoll.c Fri Jun 24 12:36:59 2011
@@ -105,7 +105,7 @@ ACR_NET_EXPORT(jlong, UnixSelector, crea
     int rc;
     acr_pollset_t *ps;
     pfd_elem_t    *pe = 0;
-    struct epoll_event epipe;
+    struct epoll_event ev;
 
     ps = ACR_TALLOC(acr_pollset_t);
     if (ps == 0)
@@ -160,10 +160,10 @@ ACR_NET_EXPORT(jlong, UnixSelector, crea
     pe->ievents = EPOLLIN;
     pe->revents = 0;
 
-    epipe.data.ptr = pe;
-    epipe.events   = EPOLLIN;
+    ev.data.ptr = pe;
+    ev.events   = EPOLLIN;
     ACR_RING_INSERT_TAIL(&ps->eset_ring, pe, pfd_elem_t, link);
-    if (epoll_ctl(ps->epfd, EPOLL_CTL_ADD, pe->fd, &epipe) == -1) {
+    if (epoll_ctl(ps->epfd, EPOLL_CTL_ADD, pe->fd, &ev) == -1) {
         /* Failed adding pipe to the pollset
          */
         ACR_THROW_NET_ERRNO();
@@ -194,7 +194,7 @@ ACR_NET_EXPORT(jint, UnixSelector, clr0)
                                           jobjectArray rs)
 {
     int cnt = 0;
-    struct epoll_event eevent = { 0 };
+    struct epoll_event ev = { 0 };
     pfd_elem_t *np, *pe;
     acr_pollset_t *ps = J2P(pollset, acr_pollset_t *);
 
@@ -222,7 +222,7 @@ ACR_NET_EXPORT(jint, UnixSelector, clr0)
     }
     ACR_RING_FOREACH_SAFE(pe, np, &ps->eset_ring, pfd_elem_t, link) {
         if (ps->wpipe[0] != pe->fd) {
-            epoll_ctl(ps->epfd, EPOLL_CTL_DEL, pe->fd, &eevent);
+            epoll_ctl(ps->epfd, EPOLL_CTL_DEL, pe->fd, &ev);
             (*env)->SetObjectArrayElement(env, rs, cnt++, pe->obj);
             /* Unref the container. */
             (*env)->DeleteGlobalRef(env, pe->obj);
@@ -264,7 +264,7 @@ ACR_NET_EXPORT(jint, UnixSelector, add0)
                                           jlong fp, jint events, jint ttlms)
 {
     int rc = 0;
-    struct epoll_event eevent;
+    struct epoll_event ev;
     pfd_elem_t    *pe;
     acr_pollset_t *ps = J2P(pollset, acr_pollset_t *);
     acr_fd_t *fd      = J2P(fp, acr_fd_t *);
@@ -322,9 +322,9 @@ ACR_NET_EXPORT(jint, UnixSelector, add0)
         pe->ttl = ACR_INFINITE;
         pe->exp = ACR_INFINITE;
     }
-    eevent.data.ptr = pe;
-    eevent.events   = pe->ievents;
-    if (epoll_ctl(ps->epfd, EPOLL_CTL_ADD, pe->fd, &eevent) == 0) {
+    ev.data.ptr = pe;
+    ev.events   = pe->ievents;
+    if (epoll_ctl(ps->epfd, EPOLL_CTL_ADD, pe->fd, &ev) == 0) {
         ps->used++;
         ACR_RING_INSERT_TAIL(&ps->eset_ring, pe, pfd_elem_t, link);
     }
@@ -341,7 +341,7 @@ ACR_NET_EXPORT(jint, UnixSelector, del0)
                                           jobject fo, jlong fp)
 {
     int rc = ACR_EOF;
-    struct epoll_event eevent = { 0 };
+    struct epoll_event ev = { 0 };
     pfd_elem_t    *pe = 0;
     acr_pollset_t *ps = J2P(pollset, acr_pollset_t *);
     acr_fd_t *fd      = J2P(fp, acr_fd_t *);
@@ -351,7 +351,7 @@ ACR_NET_EXPORT(jint, UnixSelector, del0)
         /* Already destroyed */
         goto cleanup;
     }
-    if (epoll_ctl(ps->epfd, EPOLL_CTL_DEL, fd->u.s, &eevent) == 0) {
+    if (epoll_ctl(ps->epfd, EPOLL_CTL_DEL, fd->u.s, &ev) == 0) {
         ACR_RING_FOREACH(pe, &ps->eset_ring, pfd_elem_t, link) {
             if (fd->u.s == pe->fd) {
                 /* Unref descriptor */
@@ -430,7 +430,7 @@ ACR_NET_EXPORT(jint, UnixSelector, wait0
     int i, ns, rc = 0;
     int rv = 0;
     jshort *pevents;
-    struct epoll_event eevent = { 0 };
+    struct epoll_event ev = { 0 };
     pfd_elem_t *np, *pe = 0;
     acr_time_t now = 0;
     acr_time_t tmx = 0;
@@ -523,7 +523,7 @@ ACR_NET_EXPORT(jint, UnixSelector, wait0
                 pevents[rv] = reventt(ps->epset[i].events);
                 (*env)->SetObjectArrayElement(env, rs, rv++, pe->obj);
                 if (autocancel == JNI_TRUE) {
-                    epoll_ctl(ps->epfd, EPOLL_CTL_DEL, pe->fd, &eevent);
+                    epoll_ctl(ps->epfd, EPOLL_CTL_DEL, pe->fd, &ev);
                     ps->used--;
                     /* Unref descriptor */
                     (*env)->DeleteGlobalRef(env, pe->obj);
@@ -552,7 +552,7 @@ cleanup:
                 (*env)->SetObjectArrayElement(env, rs, rv++, pe->obj);
                 if (autocancel == JNI_TRUE) {
                     /* Unref descriptor */
-                    epoll_ctl(ps->epfd, EPOLL_CTL_DEL, pe->fd, &eevent);
+                    epoll_ctl(ps->epfd, EPOLL_CTL_DEL, pe->fd, &ev);
                     (*env)->DeleteGlobalRef(env, pe->obj);
                     ACR_RING_REMOVE(pe, link);
                     ACR_RING_INSERT_TAIL(&ps->free_ring, pe, pfd_elem_t, link);



Mime
View raw message