From 0e17930dd7bfaf070b3d047c80c4f57e8de86404 Mon Sep 17 00:00:00 2001 From: David Xu Date: Sun, 9 Nov 2003 00:37:14 +0000 Subject: [PATCH] If a thread in critical region got a synchronous signal, according current signal handling mode, there is no chance to handle the signal, something must be wrong in the library, just call kse_thr_interrupt to dump its core. I have the code for a long time, but forgot to commit it. --- lib/libkse/thread/thr_kern.c | 2 ++ lib/libpthread/thread/thr_kern.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/libkse/thread/thr_kern.c b/lib/libkse/thread/thr_kern.c index 79098387b55..5186c524948 100644 --- a/lib/libkse/thread/thr_kern.c +++ b/lib/libkse/thread/thr_kern.c @@ -1568,6 +1568,8 @@ kse_check_completed(struct kse *kse) != 0) { if (SIGISMEMBER(thread->sigmask, sig)) SIGADDSET(thread->sigpend, sig); + else if (THR_IN_CRITICAL(thread)) + kse_thr_interrupt(NULL, KSE_INTR_SIGEXIT, sig); else (void)_thr_sig_add(thread, sig, &thread->tcb->tcb_tmbx.tm_syncsig); diff --git a/lib/libpthread/thread/thr_kern.c b/lib/libpthread/thread/thr_kern.c index 79098387b55..5186c524948 100644 --- a/lib/libpthread/thread/thr_kern.c +++ b/lib/libpthread/thread/thr_kern.c @@ -1568,6 +1568,8 @@ kse_check_completed(struct kse *kse) != 0) { if (SIGISMEMBER(thread->sigmask, sig)) SIGADDSET(thread->sigpend, sig); + else if (THR_IN_CRITICAL(thread)) + kse_thr_interrupt(NULL, KSE_INTR_SIGEXIT, sig); else (void)_thr_sig_add(thread, sig, &thread->tcb->tcb_tmbx.tm_syncsig);