This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C11 threads ABI questions - enum values


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]