From owner-freebsd-threads@freebsd.org Tue Sep 29 04:30:55 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 15C36A0B876 for ; Tue, 29 Sep 2015 04:30:55 +0000 (UTC) (envelope-from schulz.j@gmail.com) Received: from mail-pa0-x22d.google.com (mail-pa0-x22d.google.com [IPv6:2607:f8b0:400e:c03::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DC5B41585; Tue, 29 Sep 2015 04:30:54 +0000 (UTC) (envelope-from schulz.j@gmail.com) Received: by padhy16 with SMTP id hy16so194028345pad.1; Mon, 28 Sep 2015 21:30:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=LiGldTemkaLff/7AV//2ED1DZPZI5G+A3qU6Ha1qs7s=; b=Bl0QkSSiQH3CWOR63FKA1ucni7CCiAvhAnrPaK5NnE4aq5o1JmwSVvsUbx1nm4o2J6 n0a7n4K/APXcOh5h7nC6puBnbdfD6vSBOdwFU+iexLNc4Se56wxTkjYdbyyXGPqToaLh dqQhTRoHzY9an1sPmp3fQklifJs8pg8U0n/b4hqcNLAZN+2PJkmfKIDwCQJHHivndNNp lVZUxRUqrU43VRPN/o9M8iU+jiqRHvrjgbjs0846ynjfiFw/BIdriwe/XL/qhSOjhgEM 1/WkZLgGwHLcIB579lSCqQ85F+V9mRwLGZBV3fMUXl2kItBB744fqr09iJpLYwap8j4q 7dWQ== X-Received: by 10.68.171.37 with SMTP id ar5mr31150805pbc.39.1443501054556; Mon, 28 Sep 2015 21:30:54 -0700 (PDT) Received: from gmail.com (c-73-140-192-75.hsd1.wa.comcast.net. [73.140.192.75]) by smtp.gmail.com with ESMTPSA id rs8sm22465795pbb.14.2015.09.28.21.30.52 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 Sep 2015 21:30:52 -0700 (PDT) Sender: Jason Schulz Date: Mon, 28 Sep 2015 21:30:40 -0700 From: Jason Schulz To: John Baldwin Cc: Konstantin Belousov , freebsd-threads@freebsd.org Subject: Re: pthread_getaffinity_np issue Message-ID: <20150929043040.GA2177@gmail.com> References: <20150924181127.GC3104@gmail.com> <20150924191121.GG3104@gmail.com> <20150924192623.GL67105@kib.kiev.ua> <5496698.OIvuy2PFgu@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <5496698.OIvuy2PFgu@ralph.baldwin.cx> User-Agent: Mutt/1.5.24 (2015-08-30) 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 04:30:55 -0000 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. -J