Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 41DA5200B5E for ; Wed, 10 Aug 2016 12:42:20 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 40960160A93; Wed, 10 Aug 2016 10:42:20 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 86228160A90 for ; Wed, 10 Aug 2016 12:42:19 +0200 (CEST) Received: (qmail 90660 invoked by uid 500); 10 Aug 2016 10:42:18 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 90650 invoked by uid 99); 10 Aug 2016 10:42:18 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Aug 2016 10:42:18 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 331CF18067A for ; Wed, 10 Aug 2016 10:42:18 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.727 X-Spam-Level: X-Spam-Status: No, score=-3.727 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-1.426, SPF_PASS=-0.001] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id GJaEzumVkl82 for ; Wed, 10 Aug 2016 10:42:15 +0000 (UTC) Received: from mailserver.kippdata.de (capsella.kippdata.de [195.227.30.149]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTP id DE6155F3F5 for ; Wed, 10 Aug 2016 10:42:09 +0000 (UTC) Received: from [195.227.30.209] (notebook-rj [195.227.30.209]) by mailserver.kippdata.de (8.13.5/8.13.5) with ESMTP id u7AAfuZ2019713 for ; Wed, 10 Aug 2016 12:41:56 +0200 (CEST) Subject: Re: svn commit: r1736521 - in /apr/apr/branches/1.6.x: ./ include/ include/arch/unix/ poll/unix/ test/ To: dev@apr.apache.org References: <20160325011935.0AEE13A0223@svn01-us-west.apache.org> <788f90ae-560e-51b7-65e2-f8be96e1e359@kippdata.de> From: Rainer Jung Message-ID: Date: Wed, 10 Aug 2016 12:41:49 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <788f90ae-560e-51b7-65e2-f8be96e1e359@kippdata.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit archived-at: Wed, 10 Aug 2016 10:42:20 -0000 I found some more differences between trunk and r1736521 in 1.6.x which are all due to incomplete backports of changes applied to trunk after r899905. I backported all of those because they seemed applicable for 1.6.x. At least the poll directory, testpoll.c, apr_poll.h and arch/unix/apr_arch_poll_private.h are now in sync between trunk and 1.6.x. Regards, Rainer Am 09.08.2016 um 23:31 schrieb Rainer Jung: > Am 25.03.2016 um 02:19 schrieb minfrin@apache.org: >> Author: minfrin >> Date: Fri Mar 25 01:19:34 2016 >> New Revision: 1736521 >> >> URL: http://svn.apache.org/viewvc?rev=1736521&view=rev >> Log: >> Add apr_pollcb_wakeup(), with similar behavior to >> apr_pollset_wakeup(). Add apr_pollcb_method_name(), with similar >> behavior to apr_pollset_method_name(). >> > > ... > >> Modified: apr/apr/branches/1.6.x/poll/unix/port.c >> URL: >> http://svn.apache.org/viewvc/apr/apr/branches/1.6.x/poll/unix/port.c?rev=1736521&r1=1736520&r2=1736521&view=diff >> >> ============================================================================== >> >> --- apr/apr/branches/1.6.x/poll/unix/port.c (original) >> +++ apr/apr/branches/1.6.x/poll/unix/port.c Fri Mar 25 01:19:34 2016 >> @@ -413,7 +413,7 @@ static apr_status_t impl_pollset_poll(ap >> if ((pollset->flags & APR_POLLSET_WAKEABLE) && >> fp.desc_type == APR_POLL_FILE && >> fp.desc.f == pollset->wakeup_pipe[0]) { >> - apr_pollset_drain_wakeup_pipe(pollset); >> + apr_poll_drain_wakeup_pipe(pollset->wakeup_pipe); >> rv = APR_EINTR; >> } >> else { >> @@ -466,9 +466,8 @@ static apr_pollset_provider_t impl = { >> >> apr_pollset_provider_t *apr_pollset_provider_port = &impl; >> >> -static apr_status_t cb_cleanup(void *p_) >> +static apr_status_t impl_pollcb_cleanup(apr_pollcb_t *pollcb) >> { >> - apr_pollcb_t *pollcb = (apr_pollcb_t *) p_; >> close(pollcb->fd); >> return APR_SUCCESS; >> } >> @@ -505,7 +504,6 @@ static apr_status_t impl_pollcb_create(a >> } >> >> pollcb->pollset.port = apr_palloc(p, size * sizeof(port_event_t)); >> - apr_pool_cleanup_register(p, pollcb, cb_cleanup, >> apr_pool_cleanup_null); >> >> return APR_SUCCESS; >> } >> @@ -558,16 +556,25 @@ static apr_status_t impl_pollcb_poll(apr >> apr_pollcb_cb_t func, >> void *baton) >> { >> - apr_pollfd_t *pollfd; >> apr_status_t rv; >> - unsigned int i, nget = 1; >> + unsigned int nget = 1; >> >> rv = call_port_getn(pollcb->fd, pollcb->pollset.port, >> pollcb->nalloc, >> &nget, timeout); >> >> if (nget) { >> + unsigned int i; >> + >> for (i = 0; i < nget; i++) { >> - pollfd = (apr_pollfd_t >> *)(pollcb->pollset.port[i].portev_user); >> + apr_pollfd_t *pollfd = (apr_pollfd_t >> *)(pollcb->pollset.port[i].portev_user); >> + >> + if ((pollfd->flags & APR_POLLSET_WAKEABLE) && >> + pollfd->desc_type == APR_POLL_FILE && >> + pollfd->desc.f == pollcb->wakeup_pipe[0]) { >> + apr_poll_drain_wakeup_pipe(pollcb->wakeup_pipe); >> + return APR_EINTR; >> + } >> + >> pollfd->rtnevents = >> get_revent(pollcb->pollset.port[i].portev_events); >> >> rv = func(baton, pollfd); >> @@ -586,6 +593,7 @@ static apr_pollcb_provider_t impl_cb = { >> impl_pollcb_add, >> impl_pollcb_remove, >> impl_pollcb_poll, >> + impl_pollcb_cleanup, >> "port" >> }; > > I get a compilation error (ggc on Solaris): > > .../poll/unix/port.c: In function 'impl_pollcb_poll': > .../poll/unix/port.c:571:24: error: 'apr_pollfd_t' has no member named > 'flags' > if ((pollfd->flags & APR_POLLSET_WAKEABLE) && > ^ > > Maybe the following patch is appropriate? > > --- poll/unix/port.c (revision 1755647) > +++ poll/unix/port.c (working copy) > @@ -568,7 +568,7 @@ > for (i = 0; i < nget; i++) { > apr_pollfd_t *pollfd = (apr_pollfd_t > *)(pollcb->pollset.port[i].portev_user); > > - if ((pollfd->flags & APR_POLLSET_WAKEABLE) && > + if ((pollcb->flags & APR_POLLSET_WAKEABLE) && > pollfd->desc_type == APR_POLL_FILE && > pollfd->desc.f == pollcb->wakeup_pipe[0]) { > apr_poll_drain_wakeup_pipe(pollcb->wakeup_pipe); > > At least it builds and "make check" runs fine. > > Regards, > > Rainer