From owner-freebsd-arch@FreeBSD.ORG Mon Dec 19 15:14:49 2011 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86699106566B for ; Mon, 19 Dec 2011 15:14:49 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id 417DF8FC15 for ; Mon, 19 Dec 2011 15:14:48 +0000 (UTC) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.4/8.14.4/NETPLEX) with ESMTP id pBJFEjS5042732; Mon, 19 Dec 2011 10:14:45 -0500 X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.2.6 (mail.netplex.net [204.213.176.10]); Mon, 19 Dec 2011 10:14:46 -0500 (EST) Date: Mon, 19 Dec 2011 10:14:45 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: David Schultz In-Reply-To: <20111219150543.GA31384@zim.MIT.EDU> Message-ID: References: <20111216214913.GA1771@hoeg.nl> <20111216220914.GW50300@deviant.kiev.zoral.com.ua> <20111216221959.GB1771@hoeg.nl> <20111216223126.GX50300@deviant.kiev.zoral.com.ua> <20111218132742.GA52983@stack.nl> <20111218161503.GG1771@hoeg.nl> <20111219150543.GA31384@zim.MIT.EDU> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Kostik Belousov , Ed Schouten , arch@freebsd.org, Jilles Tjoelker , threads@freebsd.org Subject: Re: [Patch] C1X threading support X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 15:14:49 -0000 On Mon, 19 Dec 2011, David Schultz wrote: > On Sun, Dec 18, 2011, Ed Schouten wrote: >> Hi Jilles, >> >> * Jilles Tjoelker , 20111218 14:27: >>> Another idea is to implement the functions as static inline (with the >>> possible exception of thrd_create() and perhaps some more). This >>> pollutes the namespace of C1x programs with pthread_* though. >> >> Hmmm... Indeed. This would change the entire C1X threading API simply >> into a compile-time translation mechanism to pthreads. Unfortunately, it >> would make things like debugging a bit harder, as placing breakpoints on >> the functions become a bit harder. >> >> Are there any objections to such an approach? > > Technically there's a requirement that external definitions be > provided. Applications that break if you don't are pretty rare, but > why not do it right by providing some wrappers or symbol aliases in > the library? Nothing precludes you from also defining a non-static > inline function in the header file (but note that you may need an ifdef > to handle the differences between GNU and C99 inlines.) I agree, we probably want external definitions in case one needs to interface to the functions from a different language. Also, please symbol version the library. -- DE