Commit 92d90c81 authored by Samuel Thibault's avatar Samuel Thibault

hurd: Add patch to be used to re-enable thread signal disposition with glibc 2.28

parent 27df5852
To be activated with glibc 2.28 to re-install thread signal dispatch
Revert of
commit 5049fabcfad4d5197669e5aa13d4d5f87f39d0bb
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Thu Jan 25 01:47:51 2018 +0100
Until posix thread signal distribution is commited
diff --git b/htl/sysdeps/mach/hurd/pt-sigstate-destroy.c a/htl/sysdeps/mach/hurd/pt-sigstate-destroy.c
index fce56c5d0d..d5e28d22d8 100644
--- b/htl/sysdeps/mach/hurd/pt-sigstate-destroy.c
+++ a/htl/sysdeps/mach/hurd/pt-sigstate-destroy.c
@@ -24,4 +24,5 @@
void
__pthread_sigstate_destroy (struct __pthread *thread)
{
+ _hurd_sigstate_delete (thread->kernel_thread);
}
diff --git b/htl/sysdeps/mach/hurd/pt-sigstate-init.c a/htl/sysdeps/mach/hurd/pt-sigstate-init.c
index 660d5a02a6..4848f2ea91 100644
--- b/htl/sysdeps/mach/hurd/pt-sigstate-init.c
+++ a/htl/sysdeps/mach/hurd/pt-sigstate-init.c
@@ -36,7 +36,7 @@ __pthread_sigstate_init (struct __pthread *thread)
if (do_init_global)
{
struct hurd_sigstate *ss = _hurd_thread_sigstate (thread->kernel_thread);
- (void) ss;
+ _hurd_sigstate_set_global_rcv (ss);
}
else if (__pthread_num_threads >= 2)
do_init_global = 1;
Revert of
commit 797492f8769ced63b209246858c0550e23009e40
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Thu Jan 25 01:49:49 2018 +0100
Revert signal disposition, not in glibc's cvs yet
diff --git b/htl/sysdeps/mach/hurd/pt-sigstate.c a/htl/sysdeps/mach/hurd/pt-sigstate.c
index bae6ae7c45..74fd72a2c0 100644
--- b/htl/sysdeps/mach/hurd/pt-sigstate.c
+++ a/htl/sysdeps/mach/hurd/pt-sigstate.c
@@ -21,6 +21,7 @@
#include <assert.h>
#include <signal.h>
#include <hurd/signal.h>
+#include <hurd/msg.h>
#include <pt-internal.h>
@@ -31,11 +32,12 @@ __pthread_sigstate (struct __pthread *thread, int how,
{
error_t err = 0;
struct hurd_sigstate *ss;
+ sigset_t pending;
ss = _hurd_thread_sigstate (thread->kernel_thread);
assert (ss);
- __spin_lock (&ss->lock);
+ _hurd_sigstate_lock (ss);
if (oset)
*oset = ss->blocked;
@@ -66,7 +68,13 @@ __pthread_sigstate (struct __pthread *thread, int how,
if (! err && clear_pending)
__sigemptyset (&ss->pending);
- __spin_unlock (&ss->lock);
+ pending = _hurd_sigstate_pending (ss) & ~ss->blocked;
+ _hurd_sigstate_unlock (ss);
+
+ if (! err && pending)
+ /* Send a message to the signal thread so it
+ will wake up and check for pending signals. */
+ __msg_sig_post (_hurd_msgport, 0, 0, __mach_task_self ());
return err;
}
......@@ -119,6 +119,7 @@ hurd-i386/local-exec_filename.diff
hurd-i386/git-libpthread-trylock.diff
hurd-i386/git-test-atexit-race-common.diff
hurd-i386/git-UTIME.diff
#hurd-i386/libpthread_sigs.diff
i386/local-biarch.diff
i386/unsubmitted-quiet-ldconfig.diff
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment