This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: C11 threads ABI questions - enum values
- From: Rich Felker <dalias at libc dot org>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 1 Oct 2014 17:16:06 -0400
- Subject: Re: C11 threads ABI questions - enum values
- Authentication-results: sourceware.org; auth=none
- References: <20140727203825 dot GA13146 at brightrain dot aerifal dot cx> <alpine dot LNX dot 2 dot 00 dot 1408181622440 dot 743 at monopod dot intra dot ispras dot ru> <20140818192714 dot GS12888 at brightrain dot aerifal dot cx> <20141001211308 dot 88F742C397E at topped-with-meat dot com>
On Wed, Oct 01, 2014 at 02:13:08PM -0700, Roland McGrath wrote:
> > Yes, I think there's some value in being able to track what the
> > calling application _asked_ for, e.g. in the debugger, even if the
> > request is meaningless from an implementation standpoint.
> >
> > After thinking about it more, I'm probably mildly in favor of using
> > enum constants unrelated to the values of the pthread ones (at least
> > not in any official relationship).
>
> I concur on both points.
Thanks for the feedback. Since then we've got C11 threads support
committed in musl, with the following definitions. Are these
acceptable for glibc too? They're the same ones I proposed before.
enum {
thrd_success = 0,
thrd_busy = 1,
thrd_error = 2,
thrd_nomem = 3,
thrd_timedout = 4,
};
enum {
mtx_plain = 0,
mtx_recursive = 1,
mtx_timed = 2,
};
Rich