From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30857 invoked by alias); 29 May 2018 13:17:02 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 29932 invoked by uid 89); 29 May 2018 13:16:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:10.0.0 X-HELO: mail-qt0-f196.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=tjd8L33Cjd63Qe0fAT86LpKZUnEDCufluaa/6mgr/b4=; b=WfzVg6n9//WwUzo6XnbK0t/x+F+cAKuBuPMaIYe7ZLYDKdhhme598H8V0IVO6GiIwu kRbslDLZC2ME8teGkRywBpWtcIl3ONs0YkGiQtMFFb8gMaS8ij/b8Y/2qtIby2qME6z/ NkdyxyUMm0FDWaZxdFLWzNIeEsYKa3F+2JTtBFbDfXHI1R9tY1OUseZcDdNCm0FGyI2O W4HmQBYWPE2AfzU9UxKen4lBHCPXDIpb07U5yitFFtU68VRuBpt7m9vCiS3FrpAVCxnp eG7hucZ5JTnzkcR5wn7N6nXlh+Dl+K1oi0VAq2V6qAf7TmTz8WayveEn51/LQqce0vrz pEMA== X-Gm-Message-State: ALKqPwfiyYOjcKxLxs5JZp3qUQy6LG21XxSsUva0fw+7aadRwgaRXrr/ XDVUrG5yv5VPctbUGUtJH8QJ57WJ4mI= X-Google-Smtp-Source: ADUXVKIOU6a+OkjK0Iu2oAFirnexFmEXykWSynVQn+4p761FeuhwnISvN3SgRlg/ybP8w4mUgVZQCA== X-Received: by 2002:ac8:30ef:: with SMTP id w44-v6mr11915030qta.238.1527599797995; Tue, 29 May 2018 06:16:37 -0700 (PDT) Subject: Re: [PATCH] support: Add wrappers for pthread_barrierattr_t To: libc-alpha@sourceware.org References: <20180529131515.A024D415401C9@oldenburg.str.redhat.com> From: Adhemerval Zanella Openpgp: preference=signencrypt Autocrypt: addr=adhemerval.zanella@linaro.org; prefer-encrypt=mutual; keydata= xsFNBFcVGkoBEADiQU2x/cBBmAVf5C2d1xgz6zCnlCefbqaflUBw4hB/bEME40QsrVzWZ5Nq 8kxkEczZzAOKkkvv4pRVLlLn/zDtFXhlcvQRJ3yFMGqzBjofucOrmdYkOGo0uCaoJKPT186L NWp53SACXguFJpnw4ODI64ziInzXQs/rUJqrFoVIlrPDmNv/LUv1OVPKz20ETjgfpg8MNwG6 iMizMefCl+RbtXbIEZ3TE/IaDT/jcOirjv96lBKrc/pAL0h/O71Kwbbp43fimW80GhjiaN2y WGByepnkAVP7FyNarhdDpJhoDmUk9yfwNuIuESaCQtfd3vgKKuo6grcKZ8bHy7IXX1XJj2X/ BgRVhVgMHAnDPFIkXtP+SiarkUaLjGzCz7XkUn4XAGDskBNfbizFqYUQCaL2FdbW3DeZqNIa nSzKAZK7Dm9+0VVSRZXP89w71Y7JUV56xL/PlOE+YKKFdEw+gQjQi0e+DZILAtFjJLoCrkEX w4LluMhYX/X8XP6/C3xW0yOZhvHYyn72sV4yJ1uyc/qz3OY32CRy+bwPzAMAkhdwcORA3JPb kPTlimhQqVgvca8m+MQ/JFZ6D+K7QPyvEv7bQ7M+IzFmTkOCwCJ3xqOD6GjX3aphk8Sr0dq3 4Awlf5xFDAG8dn8Uuutb7naGBd/fEv6t8dfkNyzj6yvc4jpVxwARAQABzUlBZGhlbWVydmFs IFphbmVsbGEgTmV0dG8gKExpbmFybyBWUE4gS2V5KSA8YWRoZW1lcnZhbC56YW5lb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o+aoX8HAcn4sZzt2pfUB9vQMTBJ2d4+m/qO6+ cFTAceXmIoFsN8+gFN3i8Is3u12u8xGudcBPvpoy4OoG Message-ID: <82b2ad28-dbe5-6960-b1ef-d2a57f3492b4@linaro.org> Date: Tue, 29 May 2018 13:17:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180529131515.A024D415401C9@oldenburg.str.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-05/txt/msg00853.txt.bz2 On 29/05/2018 10:15, Florian Weimer wrote: > 2018-05-29 Florian Weimer > > * support/Makefile (libsupport-routines): Add > xpthread_barrierattr_destroy, xpthread_barrierattr_init, > xpthread_barrierattr_setpshared. > * support/xpthread_barrierattr_destroy.c: New file. > * support/xpthread_barrierattr_init.c: Likewise. > * support/xpthread_barrierattr_setpshared.c: Likewise. LGTM. > > diff --git a/support/Makefile b/support/Makefile > index bc2e5c69a2..652d2cdf69 100644 > --- a/support/Makefile > +++ b/support/Makefile > @@ -98,6 +98,9 @@ libsupport-routines = \ > xpthread_barrier_destroy \ > xpthread_barrier_init \ > xpthread_barrier_wait \ > + xpthread_barrierattr_destroy \ > + xpthread_barrierattr_init \ > + xpthread_barrierattr_setpshared \ > xpthread_cancel \ > xpthread_check_return \ > xpthread_cond_wait \ > diff --git a/support/xpthread_barrierattr_destroy.c b/support/xpthread_barrierattr_destroy.c > new file mode 100644 > index 0000000000..3e471f9a81 > --- /dev/null > +++ b/support/xpthread_barrierattr_destroy.c > @@ -0,0 +1,26 @@ > +/* pthread_barrierattr_destroy with error checking. > + Copyright (C) 2018 Free Software Foundation, Inc. > + This file is part of the GNU C Library. > + > + The GNU C Library is free software; you can redistribute it and/or > + modify it under the terms of the GNU Lesser General Public > + License as published by the Free Software Foundation; either > + version 2.1 of the License, or (at your option) any later version. > + > + The GNU C Library is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + Lesser General Public License for more details. > + > + You should have received a copy of the GNU Lesser General Public > + License along with the GNU C Library; if not, see > + . */ > + > +#include > + > +void > +xpthread_barrierattr_destroy (pthread_barrierattr_t *attr) > +{ > + xpthread_check_return ("pthread_barrierattr_destroy", > + pthread_barrierattr_destroy (attr)); > +} > diff --git a/support/xpthread_barrierattr_init.c b/support/xpthread_barrierattr_init.c > new file mode 100644 > index 0000000000..4ee14e78f3 > --- /dev/null > +++ b/support/xpthread_barrierattr_init.c > @@ -0,0 +1,26 @@ > +/* pthread_barrierattr_init with error checking. > + Copyright (C) 2018 Free Software Foundation, Inc. > + This file is part of the GNU C Library. > + > + The GNU C Library is free software; you can redistribute it and/or > + modify it under the terms of the GNU Lesser General Public > + License as published by the Free Software Foundation; either > + version 2.1 of the License, or (at your option) any later version. > + > + The GNU C Library is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + Lesser General Public License for more details. > + > + You should have received a copy of the GNU Lesser General Public > + License along with the GNU C Library; if not, see > + . */ > + > +#include > + > +void > +xpthread_barrierattr_init (pthread_barrierattr_t *attr) > +{ > + xpthread_check_return ("pthread_barrierattr_init", > + pthread_barrierattr_init (attr)); > +} > diff --git a/support/xpthread_barrierattr_setpshared.c b/support/xpthread_barrierattr_setpshared.c > new file mode 100644 > index 0000000000..90b2c5bec6 > --- /dev/null > +++ b/support/xpthread_barrierattr_setpshared.c > @@ -0,0 +1,26 @@ > +/* pthread_barrierattr_setpshared with error checking. > + Copyright (C) 2018 Free Software Foundation, Inc. > + This file is part of the GNU C Library. > + > + The GNU C Library is free software; you can redistribute it and/or > + modify it under the terms of the GNU Lesser General Public > + License as published by the Free Software Foundation; either > + version 2.1 of the License, or (at your option) any later version. > + > + The GNU C Library is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + Lesser General Public License for more details. > + > + You should have received a copy of the GNU Lesser General Public > + License along with the GNU C Library; if not, see > + . */ > + > +#include > + > +void > +xpthread_barrierattr_setpshared (pthread_barrierattr_t *attr, int pshared) > +{ > + xpthread_check_return ("pthread_barrierattr_setpshared", > + pthread_barrierattr_setpshared (attr, pshared)); > +} > diff --git a/support/xthread.h b/support/xthread.h > index 79358e7c99..623f5ad0ac 100644 > --- a/support/xthread.h > +++ b/support/xthread.h > @@ -41,6 +41,9 @@ void xpthread_check_return (const char *function, int value); > void xpthread_barrier_init (pthread_barrier_t *barrier, > pthread_barrierattr_t *attr, unsigned int count); > void xpthread_barrier_destroy (pthread_barrier_t *barrier); > +void xpthread_barrierattr_destroy (pthread_barrierattr_t *); > +void xpthread_barrierattr_init (pthread_barrierattr_t *); > +void xpthread_barrierattr_setpshared (pthread_barrierattr_t *, int pshared); > void xpthread_mutexattr_destroy (pthread_mutexattr_t *); > void xpthread_mutexattr_init (pthread_mutexattr_t *); > void xpthread_mutexattr_setprotocol (pthread_mutexattr_t *, int); >