From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114786 invoked by alias); 21 Jan 2020 11:36:06 -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 114777 invoked by uid 89); 21 Jan 2020 11:36:05 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-22.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Spam-Relays-External:209.85.160.196, H*RU:209.85.160.196, HContent-Transfer-Encoding:8bit X-HELO: mail-qt1-f196.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=to:cc:references:from:autocrypt:subject:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=HTmR6BnsBN75ObuzOj3tVzQhXbCIgdkXazAlfvIU15Q=; b=FcuGsMTg5wVAiU7lOwq1R1QKocjhtxlqfeRRoDMRyI6Vuoxlt7B+NMG0MwAhyWZJue RrzkDRGXxYU9Y+lDYNoiLA9Q8bPRPN78lZOv2ybPbxLRh7Qm2sUFIk1lj8x/1H5Z3OcC CoOoPJc2KhvE9UuGcdvEXimBlPjhhOFaTmRfkJwVWlCMaNS+uPuDwzKwFkAzjGY5D4KI 7M9KO8WEkCt4cPQhte6kMcibuY37MVgdMo8gyEa8k8fLxRaQldSbsKA9VbGClDNNdtgP GWveTlv/EM5iIGow4kDnrs/e5GMYVIfWdXY3Oo/RIkPMYaRMJZ40anaL8/dNHm4EhgEV a+PA== Return-Path: To: Samuel Thibault Cc: libc-alpha@sourceware.org References: <20200114185255.25813-1-samuel.thibault@ens-lyon.org> <20200114185255.25813-11-samuel.thibault@ens-lyon.org> <20200120205824.od4exjltdsclkftz@function> From: Adhemerval Zanella Subject: Re: [PATCH 09/10] htl: Add C11 threads types definitions Message-ID: Date: Tue, 21 Jan 2020 12:27:00 -0000 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: <20200120205824.od4exjltdsclkftz@function> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2020-01/txt/msg00475.txt.bz2 On 20/01/2020 17:58, Samuel Thibault wrote: > Adhemerval Zanella, le lun. 20 janv. 2020 16:08:03 -0300, a ecrit: >> On 14/01/2020 15:52, Samuel Thibault wrote: >>> diff --git a/sysdeps/htl/bits/thread-shared-types.h b/sysdeps/htl/bits/thread-shared-types.h >>> index c280f2e182..819682a07b 100644 >>> --- a/sysdeps/htl/bits/thread-shared-types.h >>> +++ b/sysdeps/htl/bits/thread-shared-types.h >>> @@ -20,5 +20,18 @@ >>> +typedef union >>> +{ >>> + struct __pthread_once __data; >>> + int __align __ONCE_ALIGNMENT; >>> + char __size[__SIZEOF_PTHREAD_ONCE_T]; >>> +} __once_flag; >>> + >>> +#define __ONCE_FLAG_INIT { { __PTHREAD_ONCE_INIT } } >>> >>> #endif /* _THREAD_SHARED_TYPES_H */ >> >> Does Hurd really need both __align and __size flag? > > I am here reproducing what we have for mtx_t and cnd_t. I agree that the > current structure does not need more than int alignment, but we could > need more than this in the future for some archs. > But you can redefine for possible new architecture on Hurd when you really need it. Also I would expect that C11 thread functions to provide simple API than POSIX ones, which most likely require less possible extensions over time.