Linux cpanel.rrshost.in 5.15.0-25-generic #25-Ubuntu SMP Wed Mar 30 15:54:22 UTC 2022 x86_64
Apache
: 109.123.238.221 | : 172.70.50.18
128 Domain
8.2.28
aev999
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
src /
glibc /
debian /
patches /
hurd-i386 /
[ HOME SHELL ]
Name
Size
Permission
Action
git-SEM_VALUE_MAX.diff
600
B
-rw-r--r--
git-WAIT.diff
1.44
KB
-rw-r--r--
git-barrier-1.diff
694
B
-rw-r--r--
git-bsd4.3-ioctls.diff
873
B
-rw-r--r--
git-clock-cputime.diff
2.86
KB
-rw-r--r--
git-cond_destroy.diff
6.02
KB
-rw-r--r--
git-cthreads-symbols.diff
1.03
KB
-rw-r--r--
git-cthreads.diff
21.02
KB
-rw-r--r--
git-fexecve.diff
1.2
KB
-rw-r--r--
git-fix-longjmp.diff
3.03
KB
-rw-r--r--
git-fork-pthread_exit.diff
1.23
KB
-rw-r--r--
git-futex-internal.diff
1.82
KB
-rw-r--r--
git-holes.diff
1.42
KB
-rw-r--r--
git-hurd-version.diff
1.02
KB
-rw-r--r--
git-hurdsig-SA_SIGINFO.diff
20.64
KB
-rw-r--r--
git-intr-msg-unwind.diff
1.23
KB
-rw-r--r--
git-ld-library-path-checks.dif...
3.57
KB
-rw-r--r--
git-libc-open.diff
970
B
-rw-r--r--
git-libpthread-nodelete.diff
771
B
-rw-r--r--
git-libpthread-testcancel.diff
1.21
KB
-rw-r--r--
git-libpthread_plt.diff
1.24
KB
-rw-r--r--
git-libpthread_syms.diff
4.68
KB
-rw-r--r--
git-lll-initializer.diff
3.15
KB
-rw-r--r--
git-lll-private.diff
611
B
-rw-r--r--
git-lll-ptr.diff
19.54
KB
-rw-r--r--
git-lll-wait-intr.diff
5.41
KB
-rw-r--r--
git-longjmp-onstack.diff
9.07
KB
-rw-r--r--
git-mmap-EINVAL.diff
668
B
-rw-r--r--
git-mmap_addr.diff
1.43
KB
-rw-r--r--
git-posix_openpt.diff
2.71
KB
-rw-r--r--
git-pselect.diff
5.72
KB
-rw-r--r--
git-pthread_atfork-hidden.diff
1.9
KB
-rw-r--r--
git-pthread_get_cleanup_stack....
2.43
KB
-rw-r--r--
git-pthread_link_tests.diff
1.86
KB
-rw-r--r--
git-pthread_self.diff
1.16
KB
-rw-r--r--
git-raise.diff
1.08
KB
-rw-r--r--
git-register-atfork.diff
7.98
KB
-rw-r--r--
git-register-atfork2.diff
1.1
KB
-rw-r--r--
git-sbrk-end.diff
5.13
KB
-rw-r--r--
git-sched_sets.diff
3.13
KB
-rw-r--r--
git-sem-intr.diff
4.85
KB
-rw-r--r--
git-sem-open-init.diff
2.51
KB
-rw-r--r--
git-sem-open.diff
31.92
KB
-rw-r--r--
git-sem-pshared.diff
15.5
KB
-rw-r--r--
git-siginfo_uesp.diff
811
B
-rw-r--r--
git-sigstate_thread_reference....
3.71
KB
-rw-r--r--
git-spin_lock.diff
829
B
-rw-r--r--
git-ss_init.diff
1.15
KB
-rw-r--r--
git-strtol-test.diff
1.47
KB
-rw-r--r--
git-tiocflush.diff
976
B
-rw-r--r--
git-trunc-times.diff
1.13
KB
-rw-r--r--
git-tst-udp.diff
3.43
KB
-rw-r--r--
git-waitid.diff
5.65
KB
-rw-r--r--
local-ED.diff
1.21
KB
-rw-r--r--
local-clock_gettime_MONOTONIC....
3.38
KB
-rw-r--r--
local-disable-ioctls.diff
1.53
KB
-rw-r--r--
local-enable-ldconfig.diff
1.15
KB
-rw-r--r--
local-exec_filename.diff
4.35
KB
-rw-r--r--
local-fix-nss.diff
1.37
KB
-rw-r--r--
local-mach_print.diff
658
B
-rw-r--r--
local-madvise_warn.diff
553
B
-rw-r--r--
local-no-bootstrap-fs-access.d...
786
B
-rw-r--r--
local-no_unsupported_ioctls.di...
2.14
KB
-rw-r--r--
local-tls-ie-align.diff
1.08
KB
-rw-r--r--
local-usr.diff
593
B
-rw-r--r--
submitted-AF_LINK.diff
1.08
KB
-rw-r--r--
submitted-bind_umask2.diff
1.65
KB
-rw-r--r--
submitted-net.diff
81.49
KB
-rw-r--r--
submitted-path_mounted.diff
1.41
KB
-rw-r--r--
sysvshm-lll.diff
532
B
-rw-r--r--
tg-EGREGIOUS-fr.diff
794
B
-rw-r--r--
tg-EIEIO-fr.diff
805
B
-rw-r--r--
tg-bigmem.diff
1.42
KB
-rw-r--r--
tg-bits_atomic.h_multiple_thre...
11.56
KB
-rw-r--r--
tg-bootstrap.diff
775
B
-rw-r--r--
tg-eintr.diff
786
B
-rw-r--r--
tg-glibc-2.24-restore-malloc-h...
548
B
-rw-r--r--
tg-hooks.diff
2.49
KB
-rw-r--r--
tg-ifaddrs_v6.diff
10.71
KB
-rw-r--r--
tg-libc_rwlock_recursive.diff
3.61
KB
-rw-r--r--
tg-mach-hurd-link.diff
987
B
-rw-r--r--
tg-sendmsg-SCM_CREDS.diff
8.03
KB
-rw-r--r--
tg-sysvshm.diff
21.62
KB
-rw-r--r--
tg-thread-cancel.diff
2.81
KB
-rw-r--r--
tg-unlockpt-chroot.diff
741
B
-rw-r--r--
unsubmitted-clock_t_centisecon...
1.79
KB
-rw-r--r--
unsubmitted-getaux_at_secure.d...
637
B
-rw-r--r--
unsubmitted-mremap.diff
838
B
-rw-r--r--
unsubmitted-prof-eintr.diff
668
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : git-cthreads.diff
Commited for 2.33 commit 9446e02b0d2e94da4ebe9df6e2c5d23adc0f1d7d Author: Samuel Thibault <samuel.thibault@ens-lyon.org> Date: Sat Nov 14 23:35:35 2020 +0000 hurd: Remove some remnants of cthreads Libc has actually been using mach's lock-internal.h mutex for a long time already. Index: glibc-2.31/conform/Makefile =================================================================== --- glibc-2.31.orig/conform/Makefile +++ glibc-2.31/conform/Makefile @@ -189,14 +189,15 @@ $(linknamespace-symlists-tests): $(objpf linknamespace-libs-isoc = $(common-objpfx)libc.a $(common-objpfx)math/libm.a linknamespace-libs-thr = $(linknamespace-libs-isoc) \ - $(common-objpfx)rt/librt.a $(static-thread-library) + $(common-objpfx)rt/librt.a \ + $(filter-out %_syms.a,$(static-thread-library)) linknamespace-libs-posix = $(linknamespace-libs-thr) \ $(common-objpfx)dlfcn/libdl.a linknamespace-libs-xsi = $(linknamespace-libs-posix) linknamespace-libs-ISO = $(linknamespace-libs-isoc) linknamespace-libs-ISO99 = $(linknamespace-libs-isoc) linknamespace-libs-ISO11 = $(linknamespace-libs-isoc) \ - $(static-thread-library) + $(filter-out %_syms.a,$(static-thread-library)) linknamespace-libs-XPG4 = $(linknamespace-libs-isoc) linknamespace-libs-XPG42 = $(linknamespace-libs-XPG4) linknamespace-libs-POSIX = $(linknamespace-libs-thr) Index: glibc-2.31/htl/libpthread_syms.a =================================================================== --- glibc-2.31.orig/htl/libpthread_syms.a +++ glibc-2.31/htl/libpthread_syms.a @@ -15,7 +15,9 @@ EXTERN(__mutex_unlock_solid) EXTERN(_cthreads_flockfile) EXTERN(_cthreads_funlockfile) EXTERN(_cthreads_ftrylockfile) -/* To get the sigthread stack layout on fork */ +/* To create the sigthread and get its stack layout on fork */ +EXTERN(pthread_create) +EXTERN(pthread_detach) EXTERN(pthread_getattr_np) EXTERN(pthread_attr_getstack) EXTERN(__pthread_enable_asynccancel) Index: glibc-2.31/htl/lockfile.c =================================================================== --- glibc-2.31.orig/htl/lockfile.c +++ glibc-2.31/htl/lockfile.c @@ -16,7 +16,6 @@ License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ -#include <cthreads.h> #include <pthread.h> /* Must come before <stdio.h>! */ #include <stdio.h> Index: glibc-2.31/hurd/dtable.c =================================================================== --- glibc-2.31.orig/hurd/dtable.c +++ glibc-2.31/hurd/dtable.c @@ -22,7 +22,7 @@ #include <stdio.h> #include <fcntl.h> #include <limits.h> -#include <cthreads.h> /* For `struct mutex'. */ +#include <lock-intern.h> /* For `struct mutex'. */ #include "set-hooks.h" #include "hurdmalloc.h" /* XXX */ Index: glibc-2.31/hurd/hurd.h =================================================================== --- glibc-2.31.orig/hurd/hurd.h +++ glibc-2.31/hurd/hurd.h @@ -102,7 +102,6 @@ extern error_t _hurd_ports_use (int whic /* Base address and size of the initial stack set up by the exec server. - If using cthreads, this stack is deallocated in startup. Not locked. */ extern vm_address_t _hurd_stack_base; @@ -122,9 +121,6 @@ extern int _hurd_orphaned; /* This variable is incremented every time the process IDs change. */ extern unsigned int _hurd_pids_changed_stamp; - -/* This condition is broadcast every time the process IDs change. */ -extern struct condition _hurd_pids_changed_sync; /* Unix `data break', for brk and sbrk. If brk and sbrk are not used, this info will not be initialized or used. */ Index: glibc-2.31/hurd/hurd/fd.h =================================================================== --- glibc-2.31.orig/hurd/hurd/fd.h +++ glibc-2.31/hurd/hurd/fd.h @@ -21,8 +21,6 @@ #define _HURD_FD_H 1 #include <features.h> -#include <cthreads.h> - #include <hurd/hurd_types.h> #include <hurd/port.h> #include <sys/socket.h> @@ -47,9 +45,12 @@ struct hurd_fd /* Current file descriptor table. */ +#if defined __USE_EXTERN_INLINES && defined _LIBC +#include <lock-intern.h> extern int _hurd_dtablesize; extern struct hurd_fd **_hurd_dtable; extern struct mutex _hurd_dtable_lock; /* Locks those two variables. */ +#endif #include <hurd/signal.h> Index: glibc-2.31/hurd/hurd/id.h =================================================================== --- glibc-2.31.orig/hurd/hurd/id.h +++ glibc-2.31/hurd/hurd/id.h @@ -24,7 +24,7 @@ #include <errno.h> #include <bits/types/error_t.h> -#include <cthreads.h> /* For `struct mutex'. */ +#include <lock-intern.h> /* For `struct mutex'. */ /* Structure describing authorization data for the process. */ Index: glibc-2.31/hurd/hurd/signal.h =================================================================== --- glibc-2.31.orig/hurd/hurd/signal.h +++ glibc-2.31/hurd/hurd/signal.h @@ -37,7 +37,6 @@ #include <bits/sigaction.h> #include <hurd/msg.h> -#include <cthreads.h> /* For `struct mutex'. */ #include <setjmp.h> /* For `jmp_buf'. */ #include <spin-lock.h> struct hurd_signal_preemptor; /* <hurd/sigpreempt.h> */ @@ -122,8 +121,6 @@ struct hurd_sigstate extern struct hurd_sigstate *_hurd_sigstates; -extern struct mutex _hurd_siglock; /* Locks _hurd_sigstates. */ - /* Get the sigstate of a given thread. If there was no sigstate for the thread, one is created, and the thread gains a reference. If the given thread is MACH_PORT_NULL, return the global sigstate. */ @@ -335,7 +332,7 @@ _hurd_setup_sighandler (struct hurd_sigs /* Function run by the signal thread to receive from the signal port. */ -extern void _hurd_msgport_receive (void); +extern void *_hurd_msgport_receive (void *arg); /* Set up STATE with a thread state that, when resumed, is like `longjmp (_hurd_sigthread_fault_env, 1)'. */ Index: glibc-2.31/hurd/hurdmalloc.c =================================================================== --- glibc-2.31.orig/hurd/hurdmalloc.c +++ glibc-2.31/hurd/hurdmalloc.c @@ -4,6 +4,7 @@ #include "hurdmalloc.h" /* XXX see that file */ #include <mach.h> +#include <mach/spin-lock.h> #define vm_allocate __vm_allocate #define vm_page_size __vm_page_size @@ -79,8 +80,6 @@ #include <assert.h> -#include <cthreads.h> - #define MCHECK /* @@ -221,7 +220,7 @@ malloc (size_t size) i += 1; n <<= 1; } - ASSERT(i < NBUCKETS); + assert(i < NBUCKETS); fl = &malloc_free_list[i]; spin_lock(&fl->lock); h = fl->head; @@ -291,11 +290,11 @@ free (void *base) * Sanity checks. */ if (i < 0 || i >= NBUCKETS) { - ASSERT(0 <= i && i < NBUCKETS); + assert(0 <= i && i < NBUCKETS); return; } if (fl != &malloc_free_list[i]) { - ASSERT(fl == &malloc_free_list[i]); + assert(fl == &malloc_free_list[i]); return; } /* @@ -340,11 +339,11 @@ realloc (void *old_base, size_t new_size * Sanity checks. */ if (i < 0 || i >= NBUCKETS) { - ASSERT(0 <= i && i < NBUCKETS); + assert(0 <= i && i < NBUCKETS); return 0; } if (fl != &malloc_free_list[i]) { - ASSERT(fl == &malloc_free_list[i]); + assert(fl == &malloc_free_list[i]); return 0; } /* Index: glibc-2.31/hurd/hurdpid.c =================================================================== --- glibc-2.31.orig/hurd/hurdpid.c +++ glibc-2.31/hurd/hurdpid.c @@ -37,13 +37,11 @@ text_set_element (_hurd_proc_subinit, in #include <hurd/msg_server.h> #include "set-hooks.h" -#include <cthreads.h> DEFINE_HOOK (_hurd_pgrp_changed_hook, (pid_t)); /* These let user threads synchronize with an operation which changes ids. */ unsigned int _hurd_pids_changed_stamp; -struct condition _hurd_pids_changed_sync; kern_return_t _S_msg_proc_newids (mach_port_t me, Index: glibc-2.31/hurd/hurdrlimit.c =================================================================== --- glibc-2.31.orig/hurd/hurdrlimit.c +++ glibc-2.31/hurd/hurdrlimit.c @@ -17,7 +17,7 @@ <https://www.gnu.org/licenses/>. */ #include <hurd.h> -#include <cthreads.h> +#include <lock-intern.h> #include <hurd/resource.h> /* This must be given an initializer, or the a.out linking rules will Index: glibc-2.31/hurd/hurdsig.c =================================================================== --- glibc-2.31.orig/hurd/hurdsig.c +++ glibc-2.31/hurd/hurdsig.c @@ -19,11 +19,12 @@ #include <stdlib.h> #include <string.h> -#include <cthreads.h> /* For `struct mutex'. */ +#include <lock-intern.h> /* For `struct mutex'. */ #include <pthreadP.h> #include <mach.h> #include <mach/thread_switch.h> #include <mach/mig_support.h> +#include <mach/vm_param.h> #include <hurd.h> #include <hurd/id.h> @@ -1488,8 +1489,8 @@ _hurdsig_init (const int *intarray, size /* Start the signal thread listening on the message port. */ -#pragma weak __cthread_fork - if (!__cthread_fork) +#pragma weak __pthread_create + if (!__pthread_create) { err = __thread_create (__mach_task_self (), &_hurd_msgport_thread); assert_perror (err); @@ -1514,41 +1515,40 @@ _hurdsig_init (const int *intarray, size } else { - /* When cthreads is being used, we need to make the signal thread a - proper cthread. Otherwise it cannot use mutex_lock et al, which - will be the cthreads versions. Various of the message port RPC + pthread_t thread; + pthread_attr_t attr; + void *addr; + size_t size; + + /* When pthread is being used, we need to make the signal thread a + proper pthread. Otherwise it cannot use mutex_lock et al, which + will be the pthread versions. Various of the message port RPC handlers need to take locks, so we need to be able to call into - cthreads code and meet its assumptions about how our thread and - its stack are arranged. Since cthreads puts it there anyway, + pthread code and meet its assumptions about how our thread and + its stack are arranged. Since pthread puts it there anyway, we'll let the signal thread's per-thread variables be found as for - any normal cthread, and just leave the magic __hurd_sigthread_* + any normal pthread, and just leave the magic __hurd_sigthread_* values all zero so they'll be ignored. */ -#pragma weak __cthread_detach + +#pragma weak __pthread_detach #pragma weak __pthread_getattr_np #pragma weak __pthread_attr_getstack - __cthread_t thread = __cthread_fork ( - (cthread_fn_t) &_hurd_msgport_receive, 0); - __cthread_detach (thread); + __pthread_create(&thread, NULL, &_hurd_msgport_receive, NULL); - if (__pthread_getattr_np) - { - /* Record signal thread stack layout for fork() */ - pthread_attr_t attr; - void *addr; - size_t size; - - __pthread_getattr_np ((pthread_t) thread, &attr); - __pthread_attr_getstack (&attr, &addr, &size); - __hurd_sigthread_stack_base = (uintptr_t) addr; - __hurd_sigthread_stack_end = __hurd_sigthread_stack_base + size; - } + /* Record signal thread stack layout for fork() */ + __pthread_getattr_np (thread, &attr); + __pthread_attr_getstack (&attr, &addr, &size); + __hurd_sigthread_stack_base = (uintptr_t) addr; + __hurd_sigthread_stack_end = __hurd_sigthread_stack_base + size; + + __pthread_detach(thread); /* XXX We need the thread port for the signal thread further on in this thread (see hurdfault.c:_hurdsigfault_init). Therefore we block until _hurd_msgport_thread is initialized by the newly created thread. This really shouldn't be necessary; we should be able to fetch the thread port for a - cthread from here. */ + pthread from here. */ while (_hurd_msgport_thread == 0) __swtch_pri (0); } Index: glibc-2.31/hurd/hurdsock.c =================================================================== --- glibc-2.31.orig/hurd/hurdsock.c +++ glibc-2.31/hurd/hurdsock.c @@ -23,7 +23,7 @@ #include <hurd/paths.h> #include <stdio.h> #include <_itoa.h> -#include <cthreads.h> /* For `struct mutex'. */ +#include <lock-intern.h> /* For `struct mutex'. */ #include "hurdmalloc.h" /* XXX */ static struct mutex lock; Index: glibc-2.31/hurd/hurdstartup.c =================================================================== --- glibc-2.31.orig/hurd/hurdstartup.c +++ glibc-2.31/hurd/hurdstartup.c @@ -41,15 +41,7 @@ extern void __mach_init (void); initialization so mig-generated stubs work, and then do an exec_startup RPC on our bootstrap port, to which the exec server responds with the information passed in the exec call, as well as our original bootstrap - port, and the base address and size of the preallocated stack. - - If using cthreads, we are given a new stack by cthreads initialization and - deallocate the stack set up by the exec server. On the new stack we call - `start1' (above) to do the rest of the startup work. Since the stack may - disappear out from under us in a machine-dependent way, we use a pile of - static variables to communicate the information from exec_startup to start1. - This is unfortunate but preferable to machine-dependent frobnication to copy - the state from the old stack to the new one. */ + port, and the base address and size of the preallocated stack. */ void Index: glibc-2.31/hurd/msgportdemux.c =================================================================== --- glibc-2.31.orig/hurd/msgportdemux.c +++ glibc-2.31/hurd/msgportdemux.c @@ -51,14 +51,14 @@ msgport_server (mach_msg_header_t *inp, } /* This is the code that the signal thread runs. */ -void -_hurd_msgport_receive (void) +void * +_hurd_msgport_receive (void *arg) { /* Get our own sigstate cached so we never again have to take a lock to fetch it. There is much code in hurdsig.c that operates with some sigstate lock held, which will deadlock with _hurd_thread_sigstate. - Furthermore, in the cthreads case this is the convenient spot + Furthermore, in the pthread case this is the convenient spot to initialize _hurd_msgport_thread (see hurdsig.c:_hurdsig_init). */ _hurd_msgport_thread = _hurd_self_sigstate ()->thread; Index: glibc-2.31/mach/lock-intern.h =================================================================== --- glibc-2.31.orig/mach/lock-intern.h +++ glibc-2.31/mach/lock-intern.h @@ -95,6 +95,15 @@ __spin_lock_locked (__spin_lock_t *__loc #endif /* Name space-clean internal interface to mutex locks. */ +struct mutex { + __spin_lock_t __held; + __spin_lock_t __lock; + const char *__name; + void *__head, *__tail; + void *__holder; +}; + +#define MUTEX_INITIALIZER { __SPIN_LOCK_INITIALIZER } /* Initialize the newly allocated mutex lock LOCK for further use. */ extern void __mutex_init (void *__lock); Index: glibc-2.31/mach/mutex-solid.c =================================================================== --- glibc-2.31.orig/mach/mutex-solid.c +++ glibc-2.31/mach/mutex-solid.c @@ -17,11 +17,10 @@ <https://www.gnu.org/licenses/>. */ #include <lock-intern.h> -#include <cthreads.h> -/* If cthreads is linked in, it will define these functions itself to do - real cthreads mutex locks. This file will only be linked in when - cthreads is not used, and `mutexes' are in fact just spin locks (and +/* If pthread is linked in, it will define these functions itself to do + real pthread mutex locks. This file will only be linked in when + pthread is not used, and `mutexes' are in fact just spin locks (and some unused storage). */ void Index: glibc-2.31/scripts/check-local-headers.sh =================================================================== --- glibc-2.31.orig/scripts/check-local-headers.sh +++ glibc-2.31/scripts/check-local-headers.sh @@ -33,7 +33,7 @@ exec ${AWK} -v includedir="$includedir" BEGIN { status = 0 exclude = "^" includedir \ - "/(.*-.*-.*/|.*-.*/|)(asm[-/]|arch|linux/|selinux/|mach/|mach_debug/|device/|hurd/(((hurd|ioctl)_types|paths)\\.h|ioctls\\.defs|ihash\\.h)|cthreads\\.h|gd|nss3/|nspr4?/|c\\+\\+/|sys/(capability|sdt(|-config))\\.h|libaudit\\.h)" + "/(.*-.*-.*/|.*-.*/|)(asm[-/]|arch|linux/|selinux/|mach/|mach_debug/|device/|hurd/(((hurd|ioctl)_types|paths)\\.h|ioctls\\.defs|ihash\\.h)|gd|nss3/|nspr4?/|c\\+\\+/|sys/(capability|sdt(|-config))\\.h|libaudit\\.h)" } /^[^ ]/ && $1 ~ /.*:/ { obj = $1 } { Index: glibc-2.31/sysdeps/htl/Makeconfig =================================================================== --- glibc-2.31.orig/sysdeps/htl/Makeconfig +++ glibc-2.31/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 Index: glibc-2.31/sysdeps/htl/bits/pthread-np.h =================================================================== --- glibc-2.31.orig/sysdeps/htl/bits/pthread-np.h +++ glibc-2.31/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 Index: glibc-2.31/sysdeps/hurd/include/hurd/signal.h =================================================================== --- glibc-2.31.orig/sysdeps/hurd/include/hurd/signal.h +++ glibc-2.31/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 Index: glibc-2.31/sysdeps/mach/hurd/brk.c =================================================================== --- glibc-2.31.orig/sysdeps/mach/hurd/brk.c +++ glibc-2.31/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> Index: glibc-2.31/sysdeps/mach/hurd/cthreads.c =================================================================== --- glibc-2.31.orig/sysdeps/mach/hurd/cthreads.c +++ glibc-2.31/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 /* 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; Index: glibc-2.31/sysdeps/mach/hurd/fork.c =================================================================== --- glibc-2.31.orig/sysdeps/mach/hurd/fork.c +++ glibc-2.31/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. */ Index: glibc-2.31/sysdeps/mach/hurd/htl/bits/pthread-np.h =================================================================== --- glibc-2.31.orig/sysdeps/mach/hurd/htl/bits/pthread-np.h +++ glibc-2.31/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 Index: glibc-2.31/sysdeps/mach/hurd/i386/Makefile =================================================================== --- glibc-2.31.orig/sysdeps/mach/hurd/i386/Makefile +++ glibc-2.31/sysdeps/mach/hurd/i386/Makefile @@ -109,6 +109,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) Index: glibc-2.31/sysdeps/mach/hurd/profil.c =================================================================== --- glibc-2.31.orig/sysdeps/mach/hurd/profil.c +++ glibc-2.31/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>
Close