diff mbox series

[02/13] nptl: Sort routines list in Makefile alphabetically

Message ID 87037a063582b22acaede4def0245c5042fd8e22.1581418947.git.fweimer@redhat.com
State New
Headers show
Series nptl: Move more functions from libpthread to libc | expand

Commit Message

Florian Weimer Feb. 11, 2020, 11:06 a.m. UTC
This will make it easier to review changes which move implementations
from libpthread to libc.
---
 nptl/Makefile | 28 +++++++++++++++++++++-------
 1 file changed, 21 insertions(+), 7 deletions(-)

Comments

Adhemerval Zanella Feb. 19, 2020, 5:34 p.m. UTC | #1
On 11/02/2020 08:06, Florian Weimer wrote:
> This will make it easier to review changes which move implementations
> from libpthread to libc.

This organization does help a lot not only refactoring, but also new
files. Maybe we could enforce it from now one, thoughts?

LGTM, thanks.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>

> ---
>  nptl/Makefile | 28 +++++++++++++++++++++-------
>  1 file changed, 21 insertions(+), 7 deletions(-)
> 
> diff --git a/nptl/Makefile b/nptl/Makefile
> index 40f27ea7cd..cd416f3208 100644
> --- a/nptl/Makefile
> +++ b/nptl/Makefile
> @@ -28,13 +28,27 @@ headers := pthread.h semaphore.h bits/semaphore.h \
>  extra-libs := libpthread
>  extra-libs-others := $(extra-libs)
>  
> -routines = alloca_cutoff forward libc-lowlevellock libc-cancellation \
> -	   libc-cleanup libc_pthread_init libc_multiple_threads \
> -	   register-atfork pthread_atfork pthread_self pthread_equal \
> -	   pthread_attr_destroy pthread_attr_init pthread_attr_getdetachstate \
> -	   pthread_attr_setdetachstate pthread_attr_getinheritsched \
> -	   pthread_attr_setinheritsched pthread_attr_getschedparam \
> -	   pthread_attr_setschedparam
> +routines = \
> +  alloca_cutoff \
> +  forward \
> +  libc-cancellation \
> +  libc-cleanup \
> +  libc-lowlevellock \
> +  libc_multiple_threads \
> +  libc_pthread_init \
> +  pthread_atfork \
> +  pthread_attr_destroy \
> +  pthread_attr_getdetachstate \
> +  pthread_attr_getinheritsched \
> +  pthread_attr_getschedparam \
> +  pthread_attr_init \
> +  pthread_attr_setdetachstate \
> +  pthread_attr_setinheritsched \
> +  pthread_attr_setschedparam \
> +  pthread_equal \
> +  pthread_self \
> +  register-atfork \
> +
>  shared-only-routines = forward
>  static-only-routines = pthread_atfork
>  
>
Florian Weimer Feb. 20, 2020, 7:54 a.m. UTC | #2
* Adhemerval Zanella:

> On 11/02/2020 08:06, Florian Weimer wrote:
>> This will make it easier to review changes which move implementations
>> from libpthread to libc.
>
> This organization does help a lot not only refactoring, but also new
> files. Maybe we could enforce it from now one, thoughts?

We are using this construct in a few other places.  Andreas did not like
the final line with the trailing \ though.

routines += function

would avoid that, but it has quadratic behavior in make, and that could
be actually visible in a few places.

> LGTM, thanks.
>
> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>

Thanks for all the reviews.

FlFlorian
diff mbox series

Patch

diff --git a/nptl/Makefile b/nptl/Makefile
index 40f27ea7cd..cd416f3208 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -28,13 +28,27 @@  headers := pthread.h semaphore.h bits/semaphore.h \
 extra-libs := libpthread
 extra-libs-others := $(extra-libs)
 
-routines = alloca_cutoff forward libc-lowlevellock libc-cancellation \
-	   libc-cleanup libc_pthread_init libc_multiple_threads \
-	   register-atfork pthread_atfork pthread_self pthread_equal \
-	   pthread_attr_destroy pthread_attr_init pthread_attr_getdetachstate \
-	   pthread_attr_setdetachstate pthread_attr_getinheritsched \
-	   pthread_attr_setinheritsched pthread_attr_getschedparam \
-	   pthread_attr_setschedparam
+routines = \
+  alloca_cutoff \
+  forward \
+  libc-cancellation \
+  libc-cleanup \
+  libc-lowlevellock \
+  libc_multiple_threads \
+  libc_pthread_init \
+  pthread_atfork \
+  pthread_attr_destroy \
+  pthread_attr_getdetachstate \
+  pthread_attr_getinheritsched \
+  pthread_attr_getschedparam \
+  pthread_attr_init \
+  pthread_attr_setdetachstate \
+  pthread_attr_setinheritsched \
+  pthread_attr_setschedparam \
+  pthread_equal \
+  pthread_self \
+  register-atfork \
+
 shared-only-routines = forward
 static-only-routines = pthread_atfork