Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Dec 2011 14:27:42 +0100
From:      Jilles Tjoelker <jilles@stack.nl>
To:        Kostik Belousov <kostikbel@gmail.com>
Cc:        arch@freebsd.org, Ed Schouten <ed@80386.nl>, threads@freebsd.org
Subject:   Re: [Patch] C1X threading support
Message-ID:  <20111218132742.GA52983@stack.nl>
In-Reply-To: <20111216223126.GX50300@deviant.kiev.zoral.com.ua>
References:  <20111216214913.GA1771@hoeg.nl> <20111216220914.GW50300@deviant.kiev.zoral.com.ua> <20111216221959.GB1771@hoeg.nl> <20111216223126.GX50300@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Dec 17, 2011 at 12:31:26AM +0200, Kostik Belousov wrote:
> On Fri, Dec 16, 2011 at 11:19:59PM +0100, Ed Schouten wrote:
> > * Kostik Belousov <kostikbel@gmail.com>, 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_<something>.

> It might be that easiest solution is to put the functions into
> separate library, besides defining them weak.

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.

> > > Do you have reference to the draft ?

> > Yes, sure:

> > 	http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf
> BTW, it looks not very useful to add a bunch of threading functions
> without at least trying to specify the memory model.

I see a discussion of the memory model in 5.1.2.4 Multi-threaded
executions and data races.

-- 
Jilles Tjoelker



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