[uclibc-ng-devel] cleanup: dl-tls.c and SHARED macro
yann at sionneau.net
Sun Apr 21 20:28:38 CEST 2019
I am wondering if libpthread/nptl/sysdeps/generic/dl-tls.c could be
cleaned up a little bit to improve code readability.
Especially I can see in the first lines that "#if SHARED => #error":
And then the file contains some #ifdef SHARED (5 of them actually)
I wonder why this code is still guarded by ifdefs.
I am guessing that this is for maintainability purposes so that this
file does not diverge too much from its friend at ./ldso/ldso/dl-tls.c
and to ease maintaining both in sync.
If this guess is right, I believe removing code between "#ifdef SHARED"
is a no-go?
In this case, I would propose changing "#ifdef SHARED" by "#if 0".
So that it is very obvious for readers that the code is never included.
That would also keep it easy to maintain both files in sync.
If previous guesses are wrong maybe we can just strip the code altogether.
Based on the feedbacks I would propose a patch accordingly.
Thank's for your feedback on that!
More information about the devel