bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH glibc] Add pthread_getname_np and pthread_setname_np for Hurd


From: Samuel Thibault
Subject: Re: [PATCH glibc] Add pthread_getname_np and pthread_setname_np for Hurd
Date: Wed, 10 Jul 2024 22:30:48 +0200
User-agent: NeoMutt/20170609 (1.8.3)

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 <flaviocruz@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 :)

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]