summaryrefslogtreecommitdiffstats
path: root/lib/libkse
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libkse')
-rw-r--r--lib/libkse/thread/thr_mutex.c6
-rw-r--r--lib/libkse/thread/thr_sig.c4
2 files changed, 7 insertions, 3 deletions
diff --git a/lib/libkse/thread/thr_mutex.c b/lib/libkse/thread/thr_mutex.c
index f3649db..e0ad7da 100644
--- a/lib/libkse/thread/thr_mutex.c
+++ b/lib/libkse/thread/thr_mutex.c
@@ -427,8 +427,7 @@ pthread_mutex_lock(pthread_mutex_t * mutex)
* Instead, the thread is interrupted and backed out of the
* waiting queue prior to executing the signal handler.
*/
- while (((*mutex)->m_owner != _thread_run) && (ret == 0) &&
- (_thread_run->interrupted == 0)) {
+ do {
/*
* Defer signals to protect the scheduling queues from
* access by the signal handler:
@@ -637,7 +636,8 @@ pthread_mutex_lock(pthread_mutex_t * mutex)
* necessary:
*/
_thread_kern_sig_undefer();
- }
+ } while (((*mutex)->m_owner != _thread_run) && (ret == 0) &&
+ (_thread_run->interrupted == 0));
if (_thread_run->interrupted != 0 &&
_thread_run->continuation != NULL)
diff --git a/lib/libkse/thread/thr_sig.c b/lib/libkse/thread/thr_sig.c
index 3ac9740..a855a61 100644
--- a/lib/libkse/thread/thr_sig.c
+++ b/lib/libkse/thread/thr_sig.c
@@ -1057,6 +1057,10 @@ thread_sigframe_add(pthread_t thread, int sig, int has_args)
sizeof(psf->siginfo));
}
+ /* Setup the signal mask: */
+ SIGSETOR(thread->sigmask, _thread_sigact[sig - 1].sa_mask);
+ sigaddset(&thread->sigmask, sig);
+
/* Set up the new frame: */
thread->curframe = psf;
thread->ctxtype = CTX_JB_NOSIG;
OpenPOWER on IntegriCloud