public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: libc-alpha@sourceware.org
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
Subject: [hurd,commited 3/8] hurd: Avoid PLT ref for __pthread_get_cleanup_stack
Date: Sat, 16 Jun 2018 01:15:00 -0000	[thread overview]
Message-ID: <20180616010627.29577-3-samuel.thibault@ens-lyon.org> (raw)
In-Reply-To: <20180616010627.29577-1-samuel.thibault@ens-lyon.org>

	* htl/pt-cleanup.c (___pthread_get_cleanup_stack): Rename to
	__pthread_get_cleanup_stack.
	(__pthread_get_cleanup_stack): Remove alias, add hidden def.
	* htl/pt-exit.c (__pthread_exit): Use __pthread_get_cleanup_stack
	instead of ___pthread_get_cleanup_stack.
	* sysdeps/htl/pthread-functions.h [libpthread]
	(__pthread_get_cleanup_stack): Add hidden proto.
	* sysdeps/htl/pthreadP.h (___pthread_get_cleanup_stack): Remove
	prototype.
---
 ChangeLog                       | 9 +++++++++
 htl/pt-cleanup.c                | 4 ++--
 htl/pt-exit.c                   | 2 +-
 sysdeps/htl/pthread-functions.h | 3 +++
 sysdeps/htl/pthreadP.h          | 1 -
 5 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0a2e082d73..390c2a1a9d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,15 @@
 	* sysdeps/mach/hurd/lseek.c: Include <errno.h>.
 	* sysdeps/mach/hurd/lseek.c (__libc_lseek): Check that the value
 	returned by __lseek64 can fit off_t, return EOVERFLOW otherwise.
+	* htl/pt-cleanup.c (___pthread_get_cleanup_stack): Rename to
+	__pthread_get_cleanup_stack.
+	(__pthread_get_cleanup_stack): Remove alias, add hidden def.
+	* htl/pt-exit.c (__pthread_exit): Use __pthread_get_cleanup_stack
+	instead of ___pthread_get_cleanup_stack.
+	* sysdeps/htl/pthread-functions.h [libpthread]
+	(__pthread_get_cleanup_stack): Add hidden proto.
+	* sysdeps/htl/pthreadP.h (___pthread_get_cleanup_stack): Remove
+	prototype.
 
 2018-06-15  Joseph Myers  <joseph@codesourcery.com>
 
diff --git a/htl/pt-cleanup.c b/htl/pt-cleanup.c
index 1b860c7bf7..b4a9834dc1 100644
--- a/htl/pt-cleanup.c
+++ b/htl/pt-cleanup.c
@@ -21,8 +21,8 @@
 #include <pt-internal.h>
 
 struct __pthread_cancelation_handler **
-___pthread_get_cleanup_stack (void)
+__pthread_get_cleanup_stack (void)
 {
   return &_pthread_self ()->cancelation_handlers;
 }
-strong_alias (___pthread_get_cleanup_stack, __pthread_get_cleanup_stack)
+libc_hidden_def (__pthread_get_cleanup_stack)
diff --git a/htl/pt-exit.c b/htl/pt-exit.c
index cb62f474fa..823e09e26e 100644
--- a/htl/pt-exit.c
+++ b/htl/pt-exit.c
@@ -41,7 +41,7 @@ __pthread_exit (void *status)
      disabled.  */
   __pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &oldstate);
 
-  for (handlers = ___pthread_get_cleanup_stack ();
+  for (handlers = __pthread_get_cleanup_stack ();
        *handlers != NULL;
        *handlers = (*handlers)->__next)
     (*handlers)->__handler ((*handlers)->__arg);
diff --git a/sysdeps/htl/pthread-functions.h b/sysdeps/htl/pthread-functions.h
index a0d06cc039..bb901e3b7f 100644
--- a/sysdeps/htl/pthread-functions.h
+++ b/sysdeps/htl/pthread-functions.h
@@ -60,6 +60,9 @@ pthread_t __pthread_self (void);
 int __pthread_setcancelstate (int, int *);
 int __pthread_setcanceltype (int, int *);
 struct __pthread_cancelation_handler **__pthread_get_cleanup_stack (void);
+#if IS_IN (libpthread)
+hidden_proto (__pthread_get_cleanup_stack)
+#endif
 int __pthread_once (pthread_once_t *, void (*) (void));
 int __pthread_rwlock_rdlock (pthread_rwlock_t *);
 int __pthread_rwlock_wrlock (pthread_rwlock_t *);
diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h
index 6c9aa6cb75..3fcb811f49 100644
--- a/sysdeps/htl/pthreadP.h
+++ b/sysdeps/htl/pthreadP.h
@@ -64,7 +64,6 @@ int __pthread_attr_setstacksize (pthread_attr_t *__attr, size_t __stacksize);
 int __pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
 			     size_t __stacksize);
 int __pthread_attr_getstack (const pthread_attr_t *, void **, size_t *);
-struct __pthread_cancelation_handler **___pthread_get_cleanup_stack (void);
 
 #if IS_IN (libpthread)
 hidden_proto (__pthread_key_create)
-- 
2.17.1

      parent reply	other threads:[~2018-06-16  1:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-16  1:06 [hurd,commited 1/8] hurd: avoid PLT ref between sendfile and sendfile64 Samuel Thibault
2018-06-16  1:06 ` [hurd,commited 8/8] hurd: Whitelist PLT refs which are difficult to avoid Samuel Thibault
2018-06-16  1:06 ` [hurd,commited 4/8] hurd: Avoid missing PLT ref from ld.so requirement Samuel Thibault
2018-06-16  1:06 ` [hurd,commited 2/8] hurd: Detect 32bit overflow in value returned by lseek Samuel Thibault
2018-06-16  1:06 ` [hurd,commited 7/8] hurd: Avoid PLT references to syscalls Samuel Thibault
2018-06-16  1:06 ` [hurd,commited 6/8] hurd: Avoid PLT ref to __mach_msg Samuel Thibault
2018-06-16  1:06 ` [hurd,commited 5/8] hurd: Avoid PLT references to shortcuts Samuel Thibault
2018-06-16  1:15 ` Samuel Thibault [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180616010627.29577-3-samuel.thibault@ens-lyon.org \
    --to=samuel.thibault@ens-lyon.org \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).