From 8456ca731197cd424e1d5a70363f568d2424d38b Mon Sep 17 00:00:00 2001 From: deischen Date: Fri, 17 Dec 1999 00:57:54 +0000 Subject: Fix problems with cancellation while in critical regions. o Cancellation flags were not getting properly set/cleared. o Loops waiting for internal locks were not being exited correctly by a cancelled thread. o Minor spelling (cancelation -> cancellation) and formatting corrections (missing tab). Found by: tg Reviewed by: jasone --- lib/libkse/thread/thr_join.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/libkse/thread/thr_join.c') diff --git a/lib/libkse/thread/thr_join.c b/lib/libkse/thread/thr_join.c index d149cf1..155dc64 100644 --- a/lib/libkse/thread/thr_join.c +++ b/lib/libkse/thread/thr_join.c @@ -98,6 +98,7 @@ pthread_join(pthread_t pthread, void **thread_return) _thread_kern_sig_undefer(); if ((_thread_run->cancelflags & PTHREAD_CANCEL_NEEDED) != 0) { + _thread_run->cancelflags &= ~PTHREAD_CANCEL_NEEDED; _thread_exit_cleanup(); pthread_exit(PTHREAD_CANCELED); } -- cgit v1.1