From de118d09d13fd2498aba8b758d566d579ddeb24f Mon Sep 17 00:00:00 2001 From: davidxu Date: Mon, 1 Nov 2004 10:49:34 +0000 Subject: Save cancelflags in signal frame, this fixes a problem that a thread in pthread_cond_wait handled a signal can no longer be canceled. Reviewed by: deischen --- lib/libpthread/thread/thr_sig.c | 2 ++ 1 file changed, 2 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 adca517..a54663a 100644 --- a/lib/libpthread/thread/thr_sig.c +++ b/lib/libpthread/thread/thr_sig.c @@ -1188,6 +1188,7 @@ thr_sigframe_restore(struct pthread *thread, struct pthread_sigframe *psf) if (psf->psf_valid == 0) PANIC("invalid pthread_sigframe\n"); thread->flags = psf->psf_flags; + thread->cancelflags = psf->psf_cancelflags; thread->interrupted = psf->psf_interrupted; thread->timeout = psf->psf_timeout; thread->state = psf->psf_state; @@ -1200,6 +1201,7 @@ thr_sigframe_save(struct pthread *thread, struct pthread_sigframe *psf) { /* This has to initialize all members of the sigframe. */ psf->psf_flags = thread->flags & THR_FLAGS_PRIVATE; + psf->psf_cancelflags = thread->cancelflags; psf->psf_interrupted = thread->interrupted; psf->psf_timeout = thread->timeout; psf->psf_state = thread->state; -- cgit v1.1