From owner-freebsd-threads@FreeBSD.ORG Sat Dec 17 03:38:47 2011 Return-Path: Delivered-To: threads@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D00C1106564A; Sat, 17 Dec 2011 03:38:47 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id 920A98FC08; Sat, 17 Dec 2011 03:38:47 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.5/8.14.2) with ESMTP id pBH3BVYb015232; Fri, 16 Dec 2011 22:11:31 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.5/8.14.2/Submit) id pBH3BVuQ015231; Fri, 16 Dec 2011 22:11:31 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Fri, 16 Dec 2011 22:11:31 -0500 From: David Schultz To: Warner Losh Message-ID: <20111217031131.GA15194@zim.MIT.EDU> Mail-Followup-To: Warner Losh , Kostik Belousov , Ed Schouten , arch@freebsd.org, threads@freebsd.org References: <20111216214913.GA1771@hoeg.nl> <20111216220914.GW50300@deviant.kiev.zoral.com.ua> <20111216221959.GB1771@hoeg.nl> <20111216223126.GX50300@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: Ed Schouten , threads@FreeBSD.ORG, arch@FreeBSD.ORG Subject: Re: [Patch] C1X threading support X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Dec 2011 03:38:47 -0000 On Fri, Dec 16, 2011, Warner Losh wrote: > > On Dec 16, 2011, at 3:31 PM, Kostik Belousov wrote: > > > On Fri, Dec 16, 2011 at 11:19:59PM +0100, Ed Schouten wrote: > >> Hello Kostik, > >> > >> * Kostik Belousov , 20111216 23:09: > >>> If application that does not use the new interface supposed to be > >>> able to implement function with new names, then the not-underscored > >>> symbols must be weak. > >> > >> For example when an application wants to implement its own functions > >> that are named thrd_*(), for example? > > Yes. The realistic example is the code written to C99/SUSv4 conformance > > that happens to define thrd_. > > > > It might be that easiest solution is to put the functions into > > separate library, besides defining them weak. > > I thought the canonical solution here was to say > > #if POSIX_VISIBLE >= 201201 > > #endif > > Except this isn't posix. :( In this case it's #if __ISO_C_VISIBLE >= x (with the appropriate changes in for the new standard). That deals with visibility issues in the compiler. The weak symbols deal with visibility issues in the linker.