Skip to content

Commit

Permalink
nptl: Remove unnecessary forwarding of pthread_cond_clockwait from libc
Browse files Browse the repository at this point in the history
In afe4de7, 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 <[email protected]>

[1] https://sourceware.org/ml/libc-alpha/2017-10/msg00082.html
  • Loading branch information
mikecrowe authored and zatrazz committed Jul 18, 2019
1 parent 9208c3b commit 4a8f6d3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
10 changes: 10 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
2019-07-18 Mike Crowe <[email protected]>

* 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-17 Rafal Luzynski <[email protected]>

[BZ #21897]
Expand Down
5 changes: 0 additions & 5 deletions nptl/forward.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
1 change: 0 additions & 1 deletion nptl/nptl-init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 0 additions & 4 deletions sysdeps/nptl/pthread-functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *,
Expand Down

0 comments on commit 4a8f6d3

Please sign in to comment.