On Wed, Jul 10, 2024 at 9:31 PM Samuel Thibault <samuel.thiba...@gnu.org>
wrote:

> Sergey Bugaev, le mer. 10 juil. 2024 21:07:21 +0300, a ecrit:
> > Do you expect the process itself to query its threads' names locally,
> > or do you expect another process (GDB) to issue thread_get_name
> > remotely?
>
> We'll want e.g. gdb to use thread_get_name to get it indeed.
>
> > On Wed, Jul 10, 2024 at 7:04 PM Flavio Cruz <flavioc...@gmail.com>
> wrote:
> > > diff --git a/htl/pt-internal.h b/htl/pt-internal.h
> > > index 85a7d905..b6ccbe12 100644
> > > --- a/htl/pt-internal.h
> > > +++ b/htl/pt-internal.h
> > > +  char *thread_name;
> >
> > Does it make sense to store the name locally? Could pthread_getname_np
> > call thread_get_name also, if we don't expect it to be a frequent
> > operation?
> >
> > Not saying you shouldn't store the name, but let's think of the space
> > vs performance trade-off and document it.
>
> I don't think pthread_getname_np will be a frequent operation, so it's
> probably not worth storing it inside glibc. That'll make the
> implementation much simpler and avoid the question of the mutex :)
>

Thanks Sergey and Samuel for the reviews. I have published a second version
with a
new thread_get_name RPC that is used to implement pthread_getname_np.


> Samuel
>

Reply via email to