From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 3EBA21F466 for ; Mon, 20 Jan 2020 18:01:31 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=UU6S5TuZYJbu0vRF 58ummjDYiFCwT+OX3rAizpnFA1igBcS26RNM/ZHwHdVafU4SYVnLN0Kr+hEPqKzn wlzjn+TvhFTHap0Vfvp4gTOaJ5koRz2ETe+KUa+xayulfxKVc0yOlyu/coeL1Diq i4dhsGl9FD3kxW/D+yk9F9HRdtA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=dPdPK3ARL1q67oaKHRTEnu KC0fw=; b=fNmsuQssEIK65rWrqm3auD7D5qTdsZYTCLvLr7GyTWm+AMFFLIobtg WyDnnEDLTHRyiCRrXrbUuqCchvTZlmxC3+2xV9N30LFV70AzpBOrRMQV6k52G6eM iBUXDYZyo1Y2NoB18BDfrIaC/3W8LbxSQJrp+OzZt26idULkl8rzE= Received: (qmail 10875 invoked by alias); 20 Jan 2020 18:01:29 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 10860 invoked by uid 89); 20 Jan 2020 18:01:28 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-qt1-f193.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:references:from:autocrypt:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=YoN+Bu3bUNQy40ofIfzWYWOIeHGGnhbO7UkDkuMx3uY=; b=MM5FD2IasH/ATWp+3zXMbHvs4w1e6H/HrdYZgCMhqVhP1PFHlR26I1stgwohgCzJZX DYw6A/cySpc5G8hWl6dsTMSZlJdipIoio8VJ1AGcqnhEEV1AlHz5N6wFYnX3p1GMPlRA NLLr6LHaYlsFq8OOBwzvYHGZ4B+K/wBER4AP53rtzN8LeQFqee5jOTXD79TGPOe/v3yr SiBra1FirSZTlgJPqkqK8k05ZrfDJVLZhBinnxZd2I786UIDcuxsfjoTey5OuBUhT4pq xKz1t2WJ9tpfA+TBFwMOmCClOpNdTTfkuVkSkAmHMIN8T1YMlybEln5gpnMRNDjKWICA K1IQ== Subject: Re: [PATCH 04/10] htl: Make __PTHREAD_ONCE_INIT more flexible To: libc-alpha@sourceware.org References: <20200114185255.25813-1-samuel.thibault@ens-lyon.org> <20200114185255.25813-6-samuel.thibault@ens-lyon.org> From: Adhemerval Zanella Message-ID: <172fdf7f-aa12-1f41-0ec5-9623bf832a3a@linaro.org> Date: Mon, 20 Jan 2020 15:01:13 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200114185255.25813-6-samuel.thibault@ens-lyon.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 14/01/2020 15:52, Samuel Thibault wrote: > by moving its (struct __pthread_once) cast into PTHREAD_ONCE_INIT. LGTM, thanks. Reviewed-by: Adhemerval Zanella > --- > sysdeps/htl/bits/types/struct___pthread_once.h | 2 +- > sysdeps/htl/pthread.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/sysdeps/htl/bits/types/struct___pthread_once.h b/sysdeps/htl/bits/types/struct___pthread_once.h > index 31a0c0817b..a6b6db708c 100644 > --- a/sysdeps/htl/bits/types/struct___pthread_once.h > +++ b/sysdeps/htl/bits/types/struct___pthread_once.h > @@ -28,6 +28,6 @@ struct __pthread_once > }; > > #define __PTHREAD_ONCE_INIT \ > - (struct __pthread_once) { 0, __PTHREAD_SPIN_LOCK_INITIALIZER } > + 0, __PTHREAD_SPIN_LOCK_INITIALIZER > > #endif /* bits/types/struct___pthread_once.h */ Ok. > diff --git a/sysdeps/htl/pthread.h b/sysdeps/htl/pthread.h > index 3216860493..38c61e8da3 100644 > --- a/sysdeps/htl/pthread.h > +++ b/sysdeps/htl/pthread.h > @@ -802,7 +802,7 @@ extern int pthread_setspecific (pthread_key_t __key, const void *__value) > > #include > > -#define PTHREAD_ONCE_INIT __PTHREAD_ONCE_INIT > +#define PTHREAD_ONCE_INIT (struct __pthread_once) { __PTHREAD_ONCE_INIT } > > /* Call INIT_ROUTINE if this function has never been called with > *ONCE_CONTROL, otherwise do nothing. */ > Ok, although I think the cast is superfluous.