From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x735.google.com (mail-qk1-x735.google.com [IPv6:2607:f8b0:4864:20::735]) by sourceware.org (Postfix) with ESMTPS id AA7973857C73 for ; Thu, 25 Mar 2021 20:22:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org AA7973857C73 Received: by mail-qk1-x735.google.com with SMTP id y18so3110837qky.11 for ; Thu, 25 Mar 2021 13:22:36 -0700 (PDT) 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:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=crZmGytBcILKjFsFcpofqtR+cUwOBWGP/Dlt6vgxres=; b=RhkFsNXBSQsvuwnGKfGssRwLxR/lt9kILempAQpkG+udWHiwLbAVO4YPHBRlE4nKgn koMaWYl7DV2aXf2/gbQjmcgwj+ymErGXjRueZGY5WUbC2/Q/0Ho4KoYy1I4mgK2SyGy9 T0XxhTxIwzEvUT/IkBPXHQPcr9bERSJQkRNzIP7VH0hsSvWuHs1Fil4/FTlzgRqv3k// KAjg9jlqXSMnVtQCkHj3wJZxYtMTe4782wZhdC+FiDuFzFd1ct8+YzEfFmUBq5r+cv+Q cRAqRdsGmX19S90xlbSoNtQW4/+rIBkktMJQ8+djRZOpDLJzqfZRoLpMamWalJse3JEY wSzw== X-Gm-Message-State: AOAM532aca2fnL2wsjfBx59kXIUWgyT16YvAnzWHFmckwoa6zE/pxkA5 UgQJkj77tzyXUbkaY3ac+KrVFk750awOxVto X-Google-Smtp-Source: ABdhPJz7Tpe4rgaIOfQJilH2PNYZXIFHndBJAHSSusXK00OaLQ/Yv1fi5aTFTnG1hnkiCeRuKnIZVw== X-Received: by 2002:a05:620a:134a:: with SMTP id c10mr9618098qkl.481.1616703756269; Thu, 25 Mar 2021 13:22:36 -0700 (PDT) Received: from [192.168.1.132] ([177.194.41.149]) by smtp.gmail.com with ESMTPSA id t2sm4337969qtd.13.2021.03.25.13.22.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Mar 2021 13:22:36 -0700 (PDT) Subject: Re: [PATCH v3 30/37] pthread: Introduce __pthread_early_init To: libc-alpha@sourceware.org, Florian Weimer References: From: Adhemerval Zanella Message-ID: Date: Thu, 25 Mar 2021 17:22:34 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Mar 2021 20:22:38 -0000 On 16/03/2021 14:31, Florian Weimer via Libc-alpha wrote: > This function is called from __libc_early_init to initialize the > pthread subsystem. LGTM, thanks. Reviewed-by; Adhemerval Zanella > --- > elf/libc_early_init.c | 3 +++ > sysdeps/pthread/pthread_early_init.h | 29 ++++++++++++++++++++++++++++ > 2 files changed, 32 insertions(+) > create mode 100644 sysdeps/pthread/pthread_early_init.h > > diff --git a/elf/libc_early_init.c b/elf/libc_early_init.c > index 9b1901a706..525edf1e7d 100644 > --- a/elf/libc_early_init.c > +++ b/elf/libc_early_init.c > @@ -21,6 +21,7 @@ > #include > #include > #include > +#include > #include > > #ifdef SHARED > @@ -40,6 +41,8 @@ __libc_early_init (_Bool initial) > __libc_initial = initial; > #endif > > + __pthread_early_init (); > + > #if ENABLE_ELISION_SUPPORT > __lll_elision_init (); > #endif Ok. > diff --git a/sysdeps/pthread/pthread_early_init.h b/sysdeps/pthread/pthread_early_init.h > new file mode 100644 > index 0000000000..b8bb9b762d > --- /dev/null > +++ b/sysdeps/pthread/pthread_early_init.h > @@ -0,0 +1,29 @@ > +/* pthread initialization called from __libc_early_init. Generic version. > + Copyright (C) 2021 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 > + . */ > + > +#ifndef _PTHREAD_EARLY_INIT_H > +#define _PTHREAD_EARLY_INIT_H 1 > + > +static inline void > +__pthread_early_init (void) > +{ > + /* The generic version does not require any additional > + initialization. */ > +} > + > +#endif /* _PTHREAD_EARLY_INIT_H */ Double space before '*/'. > Ok.