[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH htl v2 0/4] Rewrite THREAD_GSCOPE
From: |
Florian Weimer |
Subject: |
Re: [RFC PATCH htl v2 0/4] Rewrite THREAD_GSCOPE |
Date: |
Mon, 30 Aug 2021 17:37:38 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
* Sergey Bugaev:
> I can think of two ways this can be handled:
>
> * Code can be rewritten and reorganized to use port-specific files instead of
> conditional compilation. From looking at how glibc source is organized, this
> appears to be the generally preferred way. I'm sending one more patch that
> makes a (perhaps misguided) attempt to do this; but I'm not sure what would
> be good way to handle the definitions in <ldsodefs.h> -- please take a look.
Yes, that's usually how things are done.
> * A more conservative approach would be to leave the code using
> THREAD_GSCOPE_IN_TCB as is for now, but change the variable's name to
> better reflect what it's used for. I haven't really been able to come
> up with a good name, though.
You could kick the can down the road by switching to PTHREAD_IN_LIBC.
In some cases, that might actually be correct replacement.
Thanks,
Florian