From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52396 invoked by alias); 13 Feb 2017 22:16:30 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Received: (qmail 52382 invoked by uid 89); 13 Feb 2017 22:16:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.0 required=5.0 tests=BAYES_20,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=H*M:zimbra, H*x:ZimbraWebClient, H*UA:ZimbraWebClient, locks X-HELO: mx4-phx2.redhat.com Received: from mx4-phx2.redhat.com (HELO mx4-phx2.redhat.com) (209.132.183.25) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 13 Feb 2017 22:16:29 +0000 Received: from zmail20.collab.prod.int.phx2.redhat.com (zmail20.collab.prod.int.phx2.redhat.com [10.5.83.23]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v1DMGS0x018505; Mon, 13 Feb 2017 17:16:28 -0500 Date: Mon, 13 Feb 2017 22:16:00 -0000 From: Jeff Johnston To: Thomas Preudhomme Cc: newlib@sourceware.org Message-ID: <1200980402.27143306.1487024187881.JavaMail.zimbra@redhat.com> In-Reply-To: <99c5b121-f5bf-a833-3048-8d6ffc95f47a@foss.arm.com> References: <7a943313-48e7-2c8f-7250-ce47aeecda13@foss.arm.com> <99c5b121-f5bf-a833-3048-8d6ffc95f47a@foss.arm.com> Subject: Re: [PATCH 2/3, newlib] Only define static locks in multithreaded mode MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017/txt/msg00141.txt.bz2 Patch checked in. -- JEff J. ----- Original Message ----- > Hi, > > I've removed the changes to lock.h as requested. Please find attached an > updated > patch in git format-patch format. > > Best regards, > > Thomas > > On 31/01/17 17:21, Thomas Preudhomme wrote: > > And in git format-patch now. > > > > Best regards, > > > > Thomas > > > > On 31/01/17 17:10, Thomas Preudhomme wrote: > >> Hi, > >> > >> Newlib build system defines __SINGLE_THREAD__ to allow concurrency code > >> to be only compiled when newlib is configured for multithread. One such > >> example are locks which become useless in single thread mode. Although > >> most static locks are indeed guarded by !defined(__SINGLE_THREAD__), > >> some are not. > >> > >> This commit adds these missing guards to __dd_hash_mutex, > >> __atexit_recursive_mutex, __at_quick_exit_mutex and __arc4random_mutex. > >> It also makes sure locking macros in lock.h are noop in single thread > >> mode. > >> > >> Is this ok for master? > >> > >> Best regards, > >> > >> Thomas >