unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] nptl: Remove unnecessary forwarding of pthread_cond_clockwait from libc
@ 2019-07-16 14:29 Mike Crowe
  2019-07-16 18:40 ` Adhemerval Zanella
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Crowe @ 2019-07-16 14:29 UTC (permalink / raw)
  To: libc-alpha
  Cc: Mike Crowe, Adhemerval Zanella, Carlos O'Donell,
	Florian Weimer

In afe4de7d283ebd88157126c5494ce1796194c16e, I added forwarding functions
from libc to libpthread for __pthread_cond_clockwait and
pthread_cond_clockwait to mirror those for pthread_cond_timedwait. These
are unnecessary[1], since these functions aren't (yet) being called from
within libc itself. Let's remove them.

      * nptl/forward.c: Remove unnecessary __pthread_cond_clockwait and
	pthread_cond_clockwait forwarding functions.  There are no internal
	users, so it is unnecessary to expose these functions in libc.so.
	* sysdeps/nptl/pthread-functions.h (pthread_functions): Remove
	unnecessary ptr___pthread_cond_clockwait member.
	* nptl/nptl-init.c (pthread_functions): Remove assignment of
	removed member.

[1] https://sourceware.org/ml/libc-alpha/2017-10/msg00082.html
---
 ChangeLog                        | 10 ++++++++++
 nptl/forward.c                   |  5 -----
 nptl/nptl-init.c                 |  1 -
 sysdeps/nptl/pthread-functions.h |  4 ----
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index bd57a81..3d884f2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2019-07-16  Mike Crowe  <mac@mcrowe.com>
+
+	* nptl/forward.c: Remove unnecessary __pthread_cond_clockwait and
+	pthread_cond_clockwait forwarding functions.  There are no internal
+	users, so it is unnecessary to expose these functions in libc.so.
+	* sysdeps/nptl/pthread-functions.h (pthread_functions): Remove
+	unnecessary ptr___pthread_cond_clockwait member.
+	* nptl/nptl-init.c (pthread_functions): Remove assignment of
+	removed member.
+
 2019-07-12  Mike Crowe  <mac@mcrowe.com>
 
 	* nptl/pthread_cond_wait.c: (__pthread_cond_clockwait): Remove code
diff --git a/nptl/forward.c b/nptl/forward.c
index 50f358f..ed1e7d0 100644
--- a/nptl/forward.c
+++ b/nptl/forward.c
@@ -164,11 +164,6 @@ FORWARD (__pthread_cond_timedwait,
 	  const struct timespec *abstime), (cond, mutex, abstime), 0)
 versioned_symbol (libc, __pthread_cond_timedwait, pthread_cond_timedwait,
 		  GLIBC_2_3_2);
-FORWARD (__pthread_cond_clockwait,
-	 (pthread_cond_t *cond, pthread_mutex_t *mutex, clockid_t clockid,
-	  const struct timespec *abstime), (cond, mutex, clockid, abstime),
-	 0)
-weak_alias (__pthread_cond_clockwait, pthread_cond_clockwait);
 
 
 FORWARD (pthread_equal, (pthread_t thread1, pthread_t thread2),
diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c
index 9c2a3d7..73935f8 100644
--- a/nptl/nptl-init.c
+++ b/nptl/nptl-init.c
@@ -95,7 +95,6 @@ static const struct pthread_functions pthread_functions =
     .ptr___pthread_cond_signal = __pthread_cond_signal,
     .ptr___pthread_cond_wait = __pthread_cond_wait,
     .ptr___pthread_cond_timedwait = __pthread_cond_timedwait,
-    .ptr___pthread_cond_clockwait = __pthread_cond_clockwait,
 # if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_3_2)
     .ptr___pthread_cond_broadcast_2_0 = __pthread_cond_broadcast_2_0,
     .ptr___pthread_cond_destroy_2_0 = __pthread_cond_destroy_2_0,
diff --git a/sysdeps/nptl/pthread-functions.h b/sysdeps/nptl/pthread-functions.h
index cfa9660..cd5e94d 100644
--- a/sysdeps/nptl/pthread-functions.h
+++ b/sysdeps/nptl/pthread-functions.h
@@ -55,10 +55,6 @@ struct pthread_functions
   int (*ptr___pthread_cond_wait) (pthread_cond_t *, pthread_mutex_t *);
   int (*ptr___pthread_cond_timedwait) (pthread_cond_t *, pthread_mutex_t *,
 				       const struct timespec *);
-  int (*ptr___pthread_cond_clockwait) (pthread_cond_t *,
-				       pthread_mutex_t *,
-				       clockid_t,
-				       const struct timespec *);
   int (*ptr___pthread_cond_broadcast_2_0) (pthread_cond_2_0_t *);
   int (*ptr___pthread_cond_destroy_2_0) (pthread_cond_2_0_t *);
   int (*ptr___pthread_cond_init_2_0) (pthread_cond_2_0_t *,

base-commit: 1ff1373b3302e9e095dc4fd4d371451c00190780
-- 
git-series 0.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] nptl: Remove unnecessary forwarding of pthread_cond_clockwait from libc
  2019-07-16 14:29 [PATCH] nptl: Remove unnecessary forwarding of pthread_cond_clockwait from libc Mike Crowe
@ 2019-07-16 18:40 ` Adhemerval Zanella
  2019-07-23 19:54   ` Carlos O'Donell
  0 siblings, 1 reply; 4+ messages in thread
From: Adhemerval Zanella @ 2019-07-16 18:40 UTC (permalink / raw)
  To: Mike Crowe, libc-alpha; +Cc: Carlos O'Donell, Florian Weimer



On 16/07/2019 11:29, Mike Crowe wrote:
> In afe4de7d283ebd88157126c5494ce1796194c16e, I added forwarding functions
> from libc to libpthread for __pthread_cond_clockwait and
> pthread_cond_clockwait to mirror those for pthread_cond_timedwait. These
> are unnecessary[1], since these functions aren't (yet) being called from
> within libc itself. Let's remove them.
> 
>       * nptl/forward.c: Remove unnecessary __pthread_cond_clockwait and
> 	pthread_cond_clockwait forwarding functions.  There are no internal
> 	users, so it is unnecessary to expose these functions in libc.so.
> 	* sysdeps/nptl/pthread-functions.h (pthread_functions): Remove
> 	unnecessary ptr___pthread_cond_clockwait member.
> 	* nptl/nptl-init.c (pthread_functions): Remove assignment of
> 	removed member.
> 
> [1] https://sourceware.org/ml/libc-alpha/2017-10/msg00082.html

LGTM, thanks. Sorry I missed it on my reviews. We will need an ack from
Carlos to push it upstream in current release status.

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

> ---
>  ChangeLog                        | 10 ++++++++++
>  nptl/forward.c                   |  5 -----
>  nptl/nptl-init.c                 |  1 -
>  sysdeps/nptl/pthread-functions.h |  4 ----
>  4 files changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/ChangeLog b/ChangeLog
> index bd57a81..3d884f2 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,13 @@
> +2019-07-16  Mike Crowe  <mac@mcrowe.com>
> +
> +	* nptl/forward.c: Remove unnecessary __pthread_cond_clockwait and
> +	pthread_cond_clockwait forwarding functions.  There are no internal
> +	users, so it is unnecessary to expose these functions in libc.so.
> +	* sysdeps/nptl/pthread-functions.h (pthread_functions): Remove
> +	unnecessary ptr___pthread_cond_clockwait member.
> +	* nptl/nptl-init.c (pthread_functions): Remove assignment of
> +	removed member.
> +
>  2019-07-12  Mike Crowe  <mac@mcrowe.com>
>  
>  	* nptl/pthread_cond_wait.c: (__pthread_cond_clockwait): Remove code
> diff --git a/nptl/forward.c b/nptl/forward.c
> index 50f358f..ed1e7d0 100644
> --- a/nptl/forward.c
> +++ b/nptl/forward.c
> @@ -164,11 +164,6 @@ FORWARD (__pthread_cond_timedwait,
>  	  const struct timespec *abstime), (cond, mutex, abstime), 0)
>  versioned_symbol (libc, __pthread_cond_timedwait, pthread_cond_timedwait,
>  		  GLIBC_2_3_2);
> -FORWARD (__pthread_cond_clockwait,
> -	 (pthread_cond_t *cond, pthread_mutex_t *mutex, clockid_t clockid,
> -	  const struct timespec *abstime), (cond, mutex, clockid, abstime),
> -	 0)
> -weak_alias (__pthread_cond_clockwait, pthread_cond_clockwait);
>  
>  
>  FORWARD (pthread_equal, (pthread_t thread1, pthread_t thread2),
> diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c
> index 9c2a3d7..73935f8 100644
> --- a/nptl/nptl-init.c
> +++ b/nptl/nptl-init.c
> @@ -95,7 +95,6 @@ static const struct pthread_functions pthread_functions =
>      .ptr___pthread_cond_signal = __pthread_cond_signal,
>      .ptr___pthread_cond_wait = __pthread_cond_wait,
>      .ptr___pthread_cond_timedwait = __pthread_cond_timedwait,
> -    .ptr___pthread_cond_clockwait = __pthread_cond_clockwait,
>  # if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_3_2)
>      .ptr___pthread_cond_broadcast_2_0 = __pthread_cond_broadcast_2_0,
>      .ptr___pthread_cond_destroy_2_0 = __pthread_cond_destroy_2_0,
> diff --git a/sysdeps/nptl/pthread-functions.h b/sysdeps/nptl/pthread-functions.h
> index cfa9660..cd5e94d 100644
> --- a/sysdeps/nptl/pthread-functions.h
> +++ b/sysdeps/nptl/pthread-functions.h
> @@ -55,10 +55,6 @@ struct pthread_functions
>    int (*ptr___pthread_cond_wait) (pthread_cond_t *, pthread_mutex_t *);
>    int (*ptr___pthread_cond_timedwait) (pthread_cond_t *, pthread_mutex_t *,
>  				       const struct timespec *);
> -  int (*ptr___pthread_cond_clockwait) (pthread_cond_t *,
> -				       pthread_mutex_t *,
> -				       clockid_t,
> -				       const struct timespec *);
>    int (*ptr___pthread_cond_broadcast_2_0) (pthread_cond_2_0_t *);
>    int (*ptr___pthread_cond_destroy_2_0) (pthread_cond_2_0_t *);
>    int (*ptr___pthread_cond_init_2_0) (pthread_cond_2_0_t *,
> 
> base-commit: 1ff1373b3302e9e095dc4fd4d371451c00190780
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] nptl: Remove unnecessary forwarding of pthread_cond_clockwait from libc
  2019-07-16 18:40 ` Adhemerval Zanella
@ 2019-07-23 19:54   ` Carlos O'Donell
  2019-07-24 12:03     ` Mike Crowe
  0 siblings, 1 reply; 4+ messages in thread
From: Carlos O'Donell @ 2019-07-23 19:54 UTC (permalink / raw)
  To: Adhemerval Zanella, Mike Crowe, libc-alpha; +Cc: Florian Weimer

On 7/16/19 2:40 PM, Adhemerval Zanella wrote:
> 
> 
> On 16/07/2019 11:29, Mike Crowe wrote:
>> In afe4de7d283ebd88157126c5494ce1796194c16e, I added forwarding functions
>> from libc to libpthread for __pthread_cond_clockwait and
>> pthread_cond_clockwait to mirror those for pthread_cond_timedwait. These
>> are unnecessary[1], since these functions aren't (yet) being called from
>> within libc itself. Let's remove them.
>>
>>        * nptl/forward.c: Remove unnecessary __pthread_cond_clockwait and
>> 	pthread_cond_clockwait forwarding functions.  There are no internal
>> 	users, so it is unnecessary to expose these functions in libc.so.
>> 	* sysdeps/nptl/pthread-functions.h (pthread_functions): Remove
>> 	unnecessary ptr___pthread_cond_clockwait member.
>> 	* nptl/nptl-init.c (pthread_functions): Remove assignment of
>> 	removed member.
>>
>> [1] https://sourceware.org/ml/libc-alpha/2017-10/msg00082.html
> 
> LGTM, thanks. Sorry I missed it on my reviews. We will need an ack from
> Carlos to push it upstream in current release status.
> 
> Reviwed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
> 

Just double checking for myself that this is in place now. Thanks.

commit 4a8f6d3155e60c19158208ee14022f04c8b0334d
Author: Mike Crowe <mac@mcrowe.com>
Date:   Wed Jul 17 14:51:08 2019 -0300

     nptl: Remove unnecessary forwarding of pthread_cond_clockwait from libc
     
     In afe4de7d283ebd88157126c5494ce1796194c16e, I added forwarding functions
     from libc to libpthread for __pthread_cond_clockwait and
     pthread_cond_clockwait to mirror those for pthread_cond_timedwait. These
     are unnecessary[1], since these functions aren't (yet) being called from
     within libc itself. Let's remove them.
     
           * nptl/forward.c: Remove unnecessary __pthread_cond_clockwait and
             pthread_cond_clockwait forwarding functions.  There are no internal
             users, so it is unnecessary to expose these functions in libc.so.
             * sysdeps/nptl/pthread-functions.h (pthread_functions): Remove
             unnecessary ptr___pthread_cond_clockwait member.
             * nptl/nptl-init.c (pthread_functions): Remove assignment of
             removed member.
     
     Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
     
     [1] https://sourceware.org/ml/libc-alpha/2017-10/msg00082.html



>> ---
>>   ChangeLog                        | 10 ++++++++++
>>   nptl/forward.c                   |  5 -----
>>   nptl/nptl-init.c                 |  1 -
>>   sysdeps/nptl/pthread-functions.h |  4 ----
>>   4 files changed, 10 insertions(+), 10 deletions(-)
>>
>> diff --git a/ChangeLog b/ChangeLog
>> index bd57a81..3d884f2 100644
>> --- a/ChangeLog
>> +++ b/ChangeLog
>> @@ -1,3 +1,13 @@
>> +2019-07-16  Mike Crowe  <mac@mcrowe.com>
>> +
>> +	* nptl/forward.c: Remove unnecessary __pthread_cond_clockwait and
>> +	pthread_cond_clockwait forwarding functions.  There are no internal
>> +	users, so it is unnecessary to expose these functions in libc.so.
>> +	* sysdeps/nptl/pthread-functions.h (pthread_functions): Remove
>> +	unnecessary ptr___pthread_cond_clockwait member.
>> +	* nptl/nptl-init.c (pthread_functions): Remove assignment of
>> +	removed member.
>> +
>>   2019-07-12  Mike Crowe  <mac@mcrowe.com>
>>   
>>   	* nptl/pthread_cond_wait.c: (__pthread_cond_clockwait): Remove code
>> diff --git a/nptl/forward.c b/nptl/forward.c
>> index 50f358f..ed1e7d0 100644
>> --- a/nptl/forward.c
>> +++ b/nptl/forward.c
>> @@ -164,11 +164,6 @@ FORWARD (__pthread_cond_timedwait,
>>   	  const struct timespec *abstime), (cond, mutex, abstime), 0)
>>   versioned_symbol (libc, __pthread_cond_timedwait, pthread_cond_timedwait,
>>   		  GLIBC_2_3_2);
>> -FORWARD (__pthread_cond_clockwait,
>> -	 (pthread_cond_t *cond, pthread_mutex_t *mutex, clockid_t clockid,
>> -	  const struct timespec *abstime), (cond, mutex, clockid, abstime),
>> -	 0)
>> -weak_alias (__pthread_cond_clockwait, pthread_cond_clockwait);
>>   
>>   
>>   FORWARD (pthread_equal, (pthread_t thread1, pthread_t thread2),
>> diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c
>> index 9c2a3d7..73935f8 100644
>> --- a/nptl/nptl-init.c
>> +++ b/nptl/nptl-init.c
>> @@ -95,7 +95,6 @@ static const struct pthread_functions pthread_functions =
>>       .ptr___pthread_cond_signal = __pthread_cond_signal,
>>       .ptr___pthread_cond_wait = __pthread_cond_wait,
>>       .ptr___pthread_cond_timedwait = __pthread_cond_timedwait,
>> -    .ptr___pthread_cond_clockwait = __pthread_cond_clockwait,
>>   # if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_3_2)
>>       .ptr___pthread_cond_broadcast_2_0 = __pthread_cond_broadcast_2_0,
>>       .ptr___pthread_cond_destroy_2_0 = __pthread_cond_destroy_2_0,
>> diff --git a/sysdeps/nptl/pthread-functions.h b/sysdeps/nptl/pthread-functions.h
>> index cfa9660..cd5e94d 100644
>> --- a/sysdeps/nptl/pthread-functions.h
>> +++ b/sysdeps/nptl/pthread-functions.h
>> @@ -55,10 +55,6 @@ struct pthread_functions
>>     int (*ptr___pthread_cond_wait) (pthread_cond_t *, pthread_mutex_t *);
>>     int (*ptr___pthread_cond_timedwait) (pthread_cond_t *, pthread_mutex_t *,
>>   				       const struct timespec *);
>> -  int (*ptr___pthread_cond_clockwait) (pthread_cond_t *,
>> -				       pthread_mutex_t *,
>> -				       clockid_t,
>> -				       const struct timespec *);
>>     int (*ptr___pthread_cond_broadcast_2_0) (pthread_cond_2_0_t *);
>>     int (*ptr___pthread_cond_destroy_2_0) (pthread_cond_2_0_t *);
>>     int (*ptr___pthread_cond_init_2_0) (pthread_cond_2_0_t *,
>>
>> base-commit: 1ff1373b3302e9e095dc4fd4d371451c00190780
>>


-- 
Cheers,
Carlos.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] nptl: Remove unnecessary forwarding of pthread_cond_clockwait from libc
  2019-07-23 19:54   ` Carlos O'Donell
@ 2019-07-24 12:03     ` Mike Crowe
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Crowe @ 2019-07-24 12:03 UTC (permalink / raw)
  To: Carlos O'Donell; +Cc: Adhemerval Zanella, libc-alpha, Florian Weimer

On Tuesday 23 July 2019 at 15:54:57 -0400, Carlos O'Donell wrote:
> On 7/16/19 2:40 PM, Adhemerval Zanella wrote:
> > 
> > 
> > On 16/07/2019 11:29, Mike Crowe wrote:
> > > In afe4de7d283ebd88157126c5494ce1796194c16e, I added forwarding functions
> > > from libc to libpthread for __pthread_cond_clockwait and
> > > pthread_cond_clockwait to mirror those for pthread_cond_timedwait. These
> > > are unnecessary[1], since these functions aren't (yet) being called from
> > > within libc itself. Let's remove them.
> > > 
> > >        * nptl/forward.c: Remove unnecessary __pthread_cond_clockwait and
> > > 	pthread_cond_clockwait forwarding functions.  There are no internal
> > > 	users, so it is unnecessary to expose these functions in libc.so.
> > > 	* sysdeps/nptl/pthread-functions.h (pthread_functions): Remove
> > > 	unnecessary ptr___pthread_cond_clockwait member.
> > > 	* nptl/nptl-init.c (pthread_functions): Remove assignment of
> > > 	removed member.
> > > 
> > > [1] https://sourceware.org/ml/libc-alpha/2017-10/msg00082.html
> > 
> > LGTM, thanks. Sorry I missed it on my reviews. We will need an ack from
> > Carlos to push it upstream in current release status.
> > 
> > Reviwed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
> > 
> 
> Just double checking for myself that this is in place now. Thanks.
> 
> commit 4a8f6d3155e60c19158208ee14022f04c8b0334d
> Author: Mike Crowe <mac@mcrowe.com>
> Date:   Wed Jul 17 14:51:08 2019 -0300
> 
>     nptl: Remove unnecessary forwarding of pthread_cond_clockwait from libc
>     In afe4de7d283ebd88157126c5494ce1796194c16e, I added forwarding functions
>     from libc to libpthread for __pthread_cond_clockwait and
>     pthread_cond_clockwait to mirror those for pthread_cond_timedwait. These
>     are unnecessary[1], since these functions aren't (yet) being called from
>     within libc itself. Let's remove them.
>           * nptl/forward.c: Remove unnecessary __pthread_cond_clockwait and
>             pthread_cond_clockwait forwarding functions.  There are no internal
>             users, so it is unnecessary to expose these functions in libc.so.
>             * sysdeps/nptl/pthread-functions.h (pthread_functions): Remove
>             unnecessary ptr___pthread_cond_clockwait member.
>             * nptl/nptl-init.c (pthread_functions): Remove assignment of
>             removed member.
>     Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
>     [1] https://sourceware.org/ml/libc-alpha/2017-10/msg00082.html

Adhemerval lander it on master as 4a8f6d3155e60c19158208ee14022f04c8b0334d.

HTH.

Mike.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-07-24 12:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-16 14:29 [PATCH] nptl: Remove unnecessary forwarding of pthread_cond_clockwait from libc Mike Crowe
2019-07-16 18:40 ` Adhemerval Zanella
2019-07-23 19:54   ` Carlos O'Donell
2019-07-24 12:03     ` Mike Crowe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).