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 Sun, 27 Jul 2014, Rich Felker wrote:
> For the mtx types, mtx_plain and mtx_timed really could both have the
> same value; I can't see there being any reasonable implementation
> where it would matter at initialization time whether you want to
> perform timed operations on the mutex or not. And the standard does
> not seem to preclude this. In that case, the values of mtx_plain and
> mtx_timed could match the value of PTHREAD_MUTEX_NORMAL and the values
> or'd with mtx_recursive could match PTHREAD_MUTEX_RECURSIVE. Of course
> doing this is not necessary and I'm open to other choices of values.

In case the ultimate decision is _not_ to match new enum values with existing
pthread constants, then in my opinion it's preferable to keep new enum values
distinct for the sake of future debug or emulation layers that might prefer to
know in advance the kind of mutex the application meant to use.

Alexander


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