Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 46B676B09 for ; Fri, 24 Jun 2011 12:37:21 +0000 (UTC) Received: (qmail 87948 invoked by uid 500); 24 Jun 2011 12:37:21 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 87888 invoked by uid 500); 24 Jun 2011 12:37:21 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 87881 invoked by uid 99); 24 Jun 2011 12:37:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jun 2011 12:37:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jun 2011 12:37:19 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id C84E5238896F for ; Fri, 24 Jun 2011 12:36:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1139273 - /commons/sandbox/runtime/trunk/src/main/native/os/linux/epoll.c Date: Fri, 24 Jun 2011 12:36:59 -0000 To: commits@commons.apache.org From: mturk@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110624123659.C84E5238896F@eris.apache.org> 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);