This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: __libc_single_threaded design (was: Re: libpthread removal project)

On 07/10/19 1:54 pm, Florian Weimer wrote:
> Okay, let's change the subject of this subthread.
> We need a name in the reserved space because the variable will be used
> from libstdc++.

My understanding of the __libc (or __cxa on the other end) namespace is
that you'd want it if libstdc++ (and standard libraries, including glibc
itself) are the *only* intended users.  For a proper public symbol (i.e.
something we declare as widely available) it seems better to me to have
a name without the __libc prefix.

> The name is easy to change.  I believe we have support in the link
> editor so that linking to the public name also links against the private
> name.  If everything else fails, we could also have two variables which
> are updated at the same time.

Making a strong alias should be sufficient, but would we ever come
across a situation where the public and __libc_* name may assume
different meanings and hence need to exist as different variable names?

> But an application can control how it calls pthread_create and maintain
> the counter itself.  This kind of scheduling control is more in the
> territory of libgomp and the hypethical execution agents library.  I
> seriously doubt that a mere thread count is of any help at all.

OK, I don't feel too strongly about it, so I'll let this one go :)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]