Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Dec 2011 10:05:43 -0500
From:      David Schultz <das@FreeBSD.ORG>
To:        Ed Schouten <ed@80386.nl>
Cc:        Kostik Belousov <kostikbel@gmail.com>, threads@FreeBSD.ORG, Jilles Tjoelker <jilles@stack.nl>, arch@FreeBSD.ORG
Subject:   Re: [Patch] C1X threading support
Message-ID:  <20111219150543.GA31384@zim.MIT.EDU>
In-Reply-To: <20111218161503.GG1771@hoeg.nl>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Dec 18, 2011, Ed Schouten wrote:
> Hi Jilles,
> 
> * Jilles Tjoelker <jilles@stack.nl>, 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.)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111219150543.GA31384>