Date: Wed, 8 Sep 2010 02:18:20 +0000 (UTC) From: David Xu <davidxu@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r212312 - head/lib/libthr/thread Message-ID: <201009080218.o882IKsn062613@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: davidxu Date: Wed Sep 8 02:18:20 2010 New Revision: 212312 URL: http://svn.freebsd.org/changeset/base/212312 Log: To avoid possible race condition, SIGCANCEL is always sent except the thread is dead. Modified: head/lib/libthr/thread/thr_cancel.c Modified: head/lib/libthr/thread/thr_cancel.c ============================================================================== --- head/lib/libthr/thread/thr_cancel.c Wed Sep 8 01:55:03 2010 (r212311) +++ head/lib/libthr/thread/thr_cancel.c Wed Sep 8 02:18:20 2010 (r212312) @@ -67,7 +67,7 @@ _pthread_cancel(pthread_t pthread) THR_THREAD_LOCK(curthread, pthread); if (!pthread->cancel_pending) { pthread->cancel_pending = 1; - if (pthread->cancel_enable) + if (pthread->state != PS_DEAD) _thr_send_sig(pthread, SIGCANCEL); } THR_THREAD_UNLOCK(curthread, pthread);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009080218.o882IKsn062613>