This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: C11 threads ABI - mtx_t and cnd_t types
- From: Torvald Riegel <triegel at redhat dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: Rich Felker <dalias at libc dot org>, libc-alpha at sourceware dot org, Juan Manuel Torres Palma <j dot m dot torrespalma at gmail dot com>
- Date: Mon, 06 Oct 2014 18:57:59 +0200
- Subject: Re: C11 threads ABI - mtx_t and cnd_t types
- Authentication-results: sourceware.org; auth=none
- References: <20140727203825 dot GA13146 at brightrain dot aerifal dot cx> <20140831025242 dot GQ12888 at brightrain dot aerifal dot cx> <1412601479 dot 30642 dot 40 dot camel at triegel dot csb> <Pine dot LNX dot 4 dot 64 dot 1410061550230 dot 29307 at digraph dot polyomino dot org dot uk>
On Mon, 2014-10-06 at 15:52 +0000, Joseph S. Myers wrote:
> On Mon, 6 Oct 2014, Torvald Riegel wrote:
>
> > On Sat, 2014-08-30 at 22:52 -0400, Rich Felker wrote:
> > > Another issue I have on the ABI for C11 threads pertains to the types
> > > for mtx_t and cnd_t. My understanding, and I agree with this, is that
> > > it was already decided to use the same underlying sizes/alignment, and
> > > for now representations, as the corresponding POSIX types.
> >
> > I don't remember a decision being made rather than just people
> > expressing their opinion at that time, but maybe I'm wrong.
> >
> > Anyway, for mtx_t I'm starting to wonder whether a fresh start would
> > indeed be better, with some additional room for expanding the lock
> > representation to state elsewhere. (That is, mtx_t would at least be
> > pointer-sized.)
>
> If mtx_t isn't a thin wrapper round pthread_mutex_t, then doesn't that
> mean cnd_wait and cnd_timedwait can no longer be thin wrappers around the
> corresponding pthread functions?
Right. But I suspect we should still be able to reuse most of the
source.