Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Dec 2011 10:14:45 -0500 (EST)
From:      Daniel Eischen <deischen@freebsd.org>
To:        David Schultz <das@freebsd.org>
Cc:        Kostik Belousov <kostikbel@gmail.com>, Ed Schouten <ed@80386.nl>, arch@freebsd.org, Jilles Tjoelker <jilles@stack.nl>, threads@freebsd.org
Subject:   Re: [Patch] C1X threading support
Message-ID:  <Pine.GSO.4.64.1112191012360.23688@sea.ntplx.net>
In-Reply-To: <20111219150543.GA31384@zim.MIT.EDU>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 19 Dec 2011, David Schultz wrote:

> 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.)

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



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