diff options
Diffstat (limited to 'lib/libpthread/thread/thr_resume_np.c')
-rw-r--r-- | lib/libpthread/thread/thr_resume_np.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/libpthread/thread/thr_resume_np.c b/lib/libpthread/thread/thr_resume_np.c index 885a45782a206..b12baba6f81e8 100644 --- a/lib/libpthread/thread/thr_resume_np.c +++ b/lib/libpthread/thread/thr_resume_np.c @@ -29,6 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $Id$ */ #include <errno.h> #ifdef _THREAD_SAFE @@ -46,20 +47,19 @@ pthread_resume_np(pthread_t thread) /* The thread exists. Is it suspended? */ if (thread->state != PS_SUSPENDED) { /* - * Guard against preemption by a scheduling signal. - * A change of thread state modifies the waiting - * and priority queues. + * Defer signals to protect the scheduling queues + * from access by the signal handler: */ - _thread_kern_sched_defer(); + _thread_kern_sig_defer(); /* Allow the thread to run. */ PTHREAD_NEW_STATE(thread,PS_RUNNING); /* - * Reenable preemption and yield if a scheduling - * signal occurred while in the critical region. + * Undefer and handle pending signals, yielding if + * necessary: */ - _thread_kern_sched_undefer(); + _thread_kern_sig_undefer(); } } return(ret); |