From c6f06e4f2802a45e7ecdc92f8621482e5583a198 Mon Sep 17 00:00:00 2001 From: deischen Date: Fri, 4 May 2001 20:37:07 +0000 Subject: Move the check for a pending signals to after the thread has been placed in any scheduling queue(s). The process of dispatching signals to a thread can change its state which will attempt to add or remove the thread from any scheduling queue to which it belongs. This can break some assertions if the thread isn't in the queue(s) implied by its state. When adding dispatching a pending signal to a thread, be sure to remove the signal from the threads set of pending signals. PR: 27035 Tested by: brian MFC in: 1 week --- lib/libpthread/thread/thr_sig.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/libpthread/thread/thr_sig.c') diff --git a/lib/libpthread/thread/thr_sig.c b/lib/libpthread/thread/thr_sig.c index 71a88ef..9ce53a0 100644 --- a/lib/libpthread/thread/thr_sig.c +++ b/lib/libpthread/thread/thr_sig.c @@ -575,6 +575,9 @@ thread_sig_add(pthread_t pthread, int sig, int has_args) restart = _thread_sigact[sig - 1].sa_flags & SA_RESTART; + /* Make sure this signal isn't still in the pending set: */ + sigdelset(&pthread->sigpend, sig); + /* * Process according to thread state: */ -- cgit v1.1