From owner-freebsd-threads@freebsd.org Tue Sep 29 05:40:53 2015 Return-Path: Delivered-To: freebsd-threads@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 156DEA0A778 for ; Tue, 29 Sep 2015 05:40:53 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83EFC1D14; Tue, 29 Sep 2015 05:40:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id t8T5efK1066106 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 29 Sep 2015 08:40:42 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua t8T5efK1066106 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id t8T5efVk066105; Tue, 29 Sep 2015 08:40:41 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 29 Sep 2015 08:40:41 +0300 From: Konstantin Belousov To: Jason Schulz Cc: John Baldwin , freebsd-threads@freebsd.org Subject: Re: pthread_getaffinity_np issue Message-ID: <20150929054041.GF11284@kib.kiev.ua> References: <20150924181127.GC3104@gmail.com> <20150924191121.GG3104@gmail.com> <20150924192623.GL67105@kib.kiev.ua> <5496698.OIvuy2PFgu@ralph.baldwin.cx> <20150929043040.GA2177@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150929043040.GA2177@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Sep 2015 05:40:53 -0000 On Mon, Sep 28, 2015 at 09:30:40PM -0700, Jason Schulz wrote: > On Fri, Sep 25, 2015 at 09:37:55AM -0700, John Baldwin wrote: > > On Thursday, September 24, 2015 10:26:23 PM Konstantin Belousov wrote: > > > So your issue only appears when you specify _XOPEN_SOURCE. This is reasonable, > > > because __bitcount stuff in sys/types.h was put under _BSD_VISIBLE protection. > > > I am not sure why and I Cc:ed the author of the change. > > > > > > IMO all symbols from __bitcount* are in the private namespace and could > > > be made unconditionally accessible, to avoid surprises. I put the patch > > > at the end of the message which does this. > > > > It was not on purpose, more to put it in the section with other "doodads". > > If it is safe to move out from under BSD_VISIBLE then your patch is fine > > with me. The only person I can think to ask would be bde@, but my guess > > is your change is correct. > > > > -- > > John Baldwin > > > I tried the patch with _XOPEN_SOURCE=700 and the non-posix CPU_COUNT macro does > compile correctly now. I didn't try with _POSIX_SOURCE, but I would guess it > should also compile. > > If anyone wants me to test anything else with the patch, just let me know. I already committed the patch to HEAD, r288258. Unless an issue with the change is reported, it will be merged to stable/10 shortly.