about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-11-14 23:35:35 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-11-15 13:16:03 +0100
commit9446e02b0d2e94da4ebe9df6e2c5d23adc0f1d7d (patch)
tree2d6a3d3036c0ddf314a09163619a0639359e72ed /sysdeps
parent7ed2b6921feb51d3fecdd0b72e8ab7a7f37ba4ae (diff)
downloadglibc-9446e02b0d2e94da4ebe9df6e2c5d23adc0f1d7d.tar.gz
glibc-9446e02b0d2e94da4ebe9df6e2c5d23adc0f1d7d.tar.xz
glibc-9446e02b0d2e94da4ebe9df6e2c5d23adc0f1d7d.zip
hurd: Remove some remnants of cthreads
Libc has actually been using mach's lock-internal.h mutex for a long
time already.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/htl/Makeconfig2
-rw-r--r--sysdeps/htl/bits/pthread-np.h2
-rw-r--r--sysdeps/hurd/include/hurd/signal.h2
-rw-r--r--sysdeps/mach/hurd/brk.c2
-rw-r--r--sysdeps/mach/hurd/cthreads.c8
-rw-r--r--sysdeps/mach/hurd/fork.c2
-rw-r--r--sysdeps/mach/hurd/htl/bits/pthread-np.h2
-rw-r--r--sysdeps/mach/hurd/i386/Makefile2
-rw-r--r--sysdeps/mach/hurd/profil.c2
9 files changed, 14 insertions, 10 deletions
diff --git a/sysdeps/htl/Makeconfig b/sysdeps/htl/Makeconfig
index ad56cc6bd1..e8a8f405b0 100644
--- a/sysdeps/htl/Makeconfig
+++ b/sysdeps/htl/Makeconfig
@@ -4,7 +4,7 @@
 have-thread-library = yes
 
 shared-thread-library = $(common-objpfx)htl/libpthread.so
-static-thread-library = $(common-objpfx)htl/libpthread.a
+static-thread-library = $(..)htl/libpthread_syms.a $(common-objpfx)htl/libpthread.a
 bounded-thread-library = $(static-thread-library)
 
 rpath-dirs += htl
diff --git a/sysdeps/htl/bits/pthread-np.h b/sysdeps/htl/bits/pthread-np.h
index 13a0421334..8c7dc4e104 100644
--- a/sysdeps/htl/bits/pthread-np.h
+++ b/sysdeps/htl/bits/pthread-np.h
@@ -17,7 +17,7 @@
    <https://www.gnu.org/licenses/>.  */
 
 /*
- * Never include this file directly; use <pthread.h> or <cthreads.h> instead.
+ * Never include this file directly; use <pthread.h> instead.
  */
 
 #ifndef _BITS_PTHREAD_NP_H
diff --git a/sysdeps/hurd/include/hurd/signal.h b/sysdeps/hurd/include/hurd/signal.h
index f4627a7204..1dc8a1f353 100644
--- a/sysdeps/hurd/include/hurd/signal.h
+++ b/sysdeps/hurd/include/hurd/signal.h
@@ -1,3 +1,5 @@
+extern struct mutex _hurd_siglock; /* Locks _hurd_sigstates.  */
+
 #ifndef	_HURD_SIGNAL_H
 extern struct hurd_sigstate *_hurd_self_sigstate (void) __attribute__ ((__const__));
 #ifndef _ISOMAC
diff --git a/sysdeps/mach/hurd/brk.c b/sysdeps/mach/hurd/brk.c
index a6d4880028..02fdefd4b7 100644
--- a/sysdeps/mach/hurd/brk.c
+++ b/sysdeps/mach/hurd/brk.c
@@ -18,7 +18,7 @@
 #include <errno.h>
 #include <hurd.h>
 #include <hurd/resource.h>
-#include <cthreads.h>		/* For `struct mutex'.  */
+#include <lock-intern.h>	/* For `struct mutex'.  */
 #include <vm_param.h>
 
 
diff --git a/sysdeps/mach/hurd/cthreads.c b/sysdeps/mach/hurd/cthreads.c
index 23dcedb72a..0e0d06b9e1 100644
--- a/sysdeps/mach/hurd/cthreads.c
+++ b/sysdeps/mach/hurd/cthreads.c
@@ -18,7 +18,7 @@
 #include <libc-lock.h>
 #include <errno.h>
 #include <stdlib.h>
-#include <cthreads.h>
+#include <pthreadP.h>
 
 /* This serves as stub "self" pointer for libc locks when TLS is not initialized
    yet.  */
@@ -27,7 +27,7 @@ char __libc_lock_self0[0];
 /* Placeholder for key creation routine from Hurd cthreads library.  */
 int
 weak_function
-__cthread_keycreate (cthread_key_t *key)
+__cthread_keycreate (__cthread_key_t *key)
 {
   __set_errno (ENOSYS);
  *key = -1;
@@ -37,7 +37,7 @@ __cthread_keycreate (cthread_key_t *key)
 /* Placeholder for key retrieval routine from Hurd cthreads library.  */
 int
 weak_function
-__cthread_getspecific (cthread_key_t key, void **pval)
+__cthread_getspecific (__cthread_key_t key, void **pval)
 {
   *pval = NULL;
   __set_errno (ENOSYS);
@@ -47,7 +47,7 @@ __cthread_getspecific (cthread_key_t key, void **pval)
 /* Placeholder for key setting routine from Hurd cthreads library.  */
 int
 weak_function
-__cthread_setspecific (cthread_key_t key, void *val)
+__cthread_setspecific (__cthread_key_t key, void *val)
 {
   __set_errno (ENOSYS);
   return -1;
diff --git a/sysdeps/mach/hurd/fork.c b/sysdeps/mach/hurd/fork.c
index 32783069ec..3767fd9a4c 100644
--- a/sysdeps/mach/hurd/fork.c
+++ b/sysdeps/mach/hurd/fork.c
@@ -497,7 +497,7 @@ __fork (void)
 #else
       if (__hurd_sigthread_stack_end == 0)
 	{
-	  /* The signal thread has a stack assigned by cthreads.
+	  /* The signal thread has a stack assigned by pthread.
 	     The threadvar_stack variables conveniently tell us how
 	     to get to the highest address in the stack, just below
 	     the per-thread variables.  */
diff --git a/sysdeps/mach/hurd/htl/bits/pthread-np.h b/sysdeps/mach/hurd/htl/bits/pthread-np.h
index c15412de2c..f1e71dc1fc 100644
--- a/sysdeps/mach/hurd/htl/bits/pthread-np.h
+++ b/sysdeps/mach/hurd/htl/bits/pthread-np.h
@@ -17,7 +17,7 @@
    <https://www.gnu.org/licenses/>.  */
 
 /*
- * Never include this file directly; use <pthread.h> or <cthreads.h> instead.
+ * Never include this file directly; use <pthread.h> instead.
  */
 
 #ifndef _BITS_PTHREAD_NP_H
diff --git a/sysdeps/mach/hurd/i386/Makefile b/sysdeps/mach/hurd/i386/Makefile
index daeb85ba4f..8e5f12a533 100644
--- a/sysdeps/mach/hurd/i386/Makefile
+++ b/sysdeps/mach/hurd/i386/Makefile
@@ -153,6 +153,8 @@ ifeq ($(subdir),elf)
 # We do use nested functions involving creation of trampolines, notably for
 # callbacks whose parameters don't permit to get the context parameters.
 check-execstack-xfail += ld.so libc.so libpthread.so
+# We always create a thread for signals
+test-xfail-tst-single_threaded-pthread-static = yes
 endif
 
 ifeq ($(subdir),stdlib)
diff --git a/sysdeps/mach/hurd/profil.c b/sysdeps/mach/hurd/profil.c
index b475cc13b4..5d8e701975 100644
--- a/sysdeps/mach/hurd/profil.c
+++ b/sysdeps/mach/hurd/profil.c
@@ -22,7 +22,7 @@
 #include <hurd.h>
 #include <mach/mach4.h>
 #include <mach/pc_sample.h>
-#include <cthreads.h>
+#include <lock-intern.h>
 #include <assert.h>
 #include <libc-internal.h>