From a9513dc678a13efd334ffd491e2613bed5fe93d0 Mon Sep 17 00:00:00 2001 From: Daniel Eischen Date: Fri, 29 Jun 2001 17:09:07 +0000 Subject: [PATCH] Clear the in thread scheduler flag after jumping to the start of a signal handler from the scheduler. MFC after: 1 week --- lib/libc_r/uthread/uthread_sig.c | 6 ++++++ lib/libkse/thread/thr_sig.c | 6 ++++++ lib/libpthread/thread/thr_sig.c | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/lib/libc_r/uthread/uthread_sig.c b/lib/libc_r/uthread/uthread_sig.c index fd5180c90683..9ca197efdbec 100644 --- a/lib/libc_r/uthread/uthread_sig.c +++ b/lib/libc_r/uthread/uthread_sig.c @@ -932,6 +932,12 @@ _thread_sig_wrapper(void) thread->curframe = NULL; PTHREAD_ASSERT(psf != NULL, "Invalid signal frame in signal handler"); + /* + * We're coming from the kernel scheduler; clear the in + * scheduler flag: + */ + _thread_kern_in_sched = 0; + /* Check the threads previous state: */ if (psf->saved_state.psd_state != PS_RUNNING) { /* diff --git a/lib/libkse/thread/thr_sig.c b/lib/libkse/thread/thr_sig.c index fd5180c90683..9ca197efdbec 100644 --- a/lib/libkse/thread/thr_sig.c +++ b/lib/libkse/thread/thr_sig.c @@ -932,6 +932,12 @@ _thread_sig_wrapper(void) thread->curframe = NULL; PTHREAD_ASSERT(psf != NULL, "Invalid signal frame in signal handler"); + /* + * We're coming from the kernel scheduler; clear the in + * scheduler flag: + */ + _thread_kern_in_sched = 0; + /* Check the threads previous state: */ if (psf->saved_state.psd_state != PS_RUNNING) { /* diff --git a/lib/libpthread/thread/thr_sig.c b/lib/libpthread/thread/thr_sig.c index fd5180c90683..9ca197efdbec 100644 --- a/lib/libpthread/thread/thr_sig.c +++ b/lib/libpthread/thread/thr_sig.c @@ -932,6 +932,12 @@ _thread_sig_wrapper(void) thread->curframe = NULL; PTHREAD_ASSERT(psf != NULL, "Invalid signal frame in signal handler"); + /* + * We're coming from the kernel scheduler; clear the in + * scheduler flag: + */ + _thread_kern_in_sched = 0; + /* Check the threads previous state: */ if (psf->saved_state.psd_state != PS_RUNNING) { /*