public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Rich Felker <dalias@libc.org>
To: libc-alpha@sourceware.org
Subject: Re: C11 threads ABI questions - enum values
Date: Mon, 18 Aug 2014 19:27:00 -0000	[thread overview]
Message-ID: <20140818192714.GS12888@brightrain.aerifal.cx> (raw)
In-Reply-To: <alpine.LNX.2.00.1408181622440.743@monopod.intra.ispras.ru>

On Mon, Aug 18, 2014 at 04:25:57PM +0400, Alexander Monakov wrote:
> 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.

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).

Rich

  reply	other threads:[~2014-08-18 19:27 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-27 20:38 Rich Felker
2014-08-17  7:15 ` Juan Manuel Torres Palma
2014-08-18 19:49   ` Rich Felker
2014-08-26 11:19     ` Juan Manuel Torres Palma
2014-08-26 14:09       ` Rich Felker
2014-08-18 12:27 ` Alexander Monakov
2014-08-18 19:27   ` Rich Felker [this message]
2014-10-01 21:13     ` Roland McGrath
2014-10-01 21:16       ` Rich Felker
2014-10-01 21:30         ` Roland McGrath
2014-10-02  0:17           ` Rich Felker
2014-10-02  7:12             ` Juan Manuel Torres Palma
2014-10-02 14:57               ` Rich Felker
2014-10-02 18:42                 ` Juan Manuel Torres Palma
2014-10-02 21:42             ` Roland McGrath
2014-10-02 22:30               ` Rich Felker
2014-10-03 10:40                 ` Joseph S. Myers
2014-10-03 15:19                   ` Rich Felker
2014-10-03 15:31                     ` Joseph S. Myers
2014-10-03 15:33                       ` Rich Felker
2014-10-03 18:39                         ` Christoph Hellwig
2014-10-03 19:49                           ` Rich Felker
2014-10-04 17:53                             ` Christoph Hellwig
2014-10-04 22:58                               ` Rich Felker
2014-10-05  9:49                                 ` Christoph Hellwig
2014-10-05 16:14                                   ` Rich Felker
2014-10-05 16:23                                     ` Christoph Hellwig
2014-10-23  8:00                                       ` Christoph Hellwig
2014-10-23 16:37                                         ` Rich Felker
2014-10-23 16:38                                           ` Rich Felker
2014-10-23 16:58                                             ` Christoph Hellwig
2014-08-31  2:52 ` C11 threads ABI - mtx_t and cnd_t types Rich Felker
2014-08-31  8:48   ` pinskia
2014-08-31 12:28     ` Rich Felker
2014-10-06 13:18   ` Torvald Riegel
2014-10-06 15:52     ` Joseph S. Myers
2014-10-06 16:58       ` Torvald Riegel
2014-10-06 17:58     ` Rich Felker
2014-10-07 12:51       ` Torvald Riegel
2014-10-07 13:27         ` Rich Felker
2014-10-07 13:59           ` Torvald Riegel
2014-10-07 14:13             ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140818192714.GS12888@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).