public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Cc: Trevor Gross <tmgross@umich.edu>,
	 Trevor Gross via Libc-help <libc-help@sourceware.org>,
	 jistone@redhat.com,  Carlos O'Donell <carlos@redhat.com>
Subject: Re: RFC: A way to get a TID from a pthread_t handler
Date: Mon, 15 Jan 2024 20:54:55 +0100	[thread overview]
Message-ID: <87le8q4bjk.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <41ebee39-2fe5-4ea0-ae6d-94321d2e59d0@linaro.org> (Adhemerval Zanella Netto's message of "Mon, 15 Jan 2024 16:47:25 -0300")

* Adhemerval Zanella Netto:

> Not really, mainly because I am not fully convinced that returning the
> TID is really a good idea.  It means that we will have two unique
> identifiers for a pthread thread that might eventually get out of sync
> (which would require us to add some support to return the correct value),
> and it is API deviation that need some justification (since pthread was
> defined as pthread_t being a opaque identifier).

I think this point is largely moot because we already provide this
information through pthread_getcpuclockid.  Applications can call this
function and reverse the encoding to get the TID.  We might as well make
this explicit, so that it's clearer that the application is asking for
the TID.

Thanks,
Florian


      reply	other threads:[~2024-01-15 19:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-11  6:10 Trevor Gross
2024-01-11 18:23 ` Carlos O'Donell
2024-01-12  7:29   ` Trevor Gross
2024-01-11 21:32 ` Florian Weimer
2024-01-12  7:55   ` Trevor Gross
2024-01-15 19:47     ` Adhemerval Zanella Netto
2024-01-15 19:54       ` Florian Weimer [this message]

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=87le8q4bjk.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=carlos@redhat.com \
    --cc=jistone@redhat.com \
    --cc=libc-help@sourceware.org \
    --cc=tmgross@umich.edu \
    /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).