From: Michael Snyder <msnyder@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: Mark Kettenis <kettenis@chello.nl>, gdb-patches@sources.redhat.com
Subject: Re: RFA [threads]: Thread cache
Date: Tue, 14 Jan 2003 22:33:00 -0000 [thread overview]
Message-ID: <3E24901B.4841796E@redhat.com> (raw)
In-Reply-To: <20030114002758.GA30705@nevyn.them.org>
Daniel Jacobowitz wrote:
>
> On Mon, Jan 13, 2003 at 04:04:20PM -0800, Michael Snyder wrote:
> > Daniel Jacobowitz wrote:
> > > For instance, I'd like to know if I
> > > can safely cache the thread handles across resumes; if I could, this
> > > would be much much much much easier to do efficiently. We could get
> > > the thread handle and LWP when the thread is created, and then hold the
> > > thread handle, and optionally hold the LWP. I am pretty sure this is
> > > safe given glibc, but I don't know in general.
> >
> > I think in general not.
>
> Hmm. The Solaris documentation suggests that this is valid; I have no
> way to check whether it actually is, and there is no explicit
> description of the lifetime of a thread handle, but it doesn't describe
> them as being of limited life. It's a handle to "the thread object"
> itself.
Dan,
I passed your question along to Ulrich Drepper, and he says that,
if by "thread handle" you mean the th_unique value, then yes,
those are persistant until the thread exits. If you mean the
td_thrhandle_t value, though, then no, they are not persistant.
They are allocated by libthread-db as needed, then thrown away.
next prev parent reply other threads:[~2003-01-14 22:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-10 20:46 Daniel Jacobowitz
2003-01-11 12:14 ` Mark Kettenis
2003-01-13 21:48 ` Daniel Jacobowitz
2003-01-14 0:04 ` Michael Snyder
2003-01-14 0:27 ` Daniel Jacobowitz
2003-01-14 22:33 ` Michael Snyder [this message]
2003-01-13 21:49 ` Daniel Jacobowitz
2003-01-11 17:58 ` Andrew Cagney
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=3E24901B.4841796E@redhat.com \
--to=msnyder@redhat.com \
--cc=drow@mvista.com \
--cc=gdb-patches@sources.redhat.com \
--cc=kettenis@chello.nl \
/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