Author: kib Date: Wed Jun 19 04:47:41 2013 New Revision: 251985 URL: http://svnweb.freebsd.org/changeset/base/251985
Log: The SUSv4tc1 requires that pthread_setcancelstate() shall be not a cancellation point. When enabling the cancellation, only process the pending cancellation for asynchronous mode. Reported and reviewed by: Kohji Okuno <okuno.ko...@jp.panasonic.com> Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/lib/libthr/thread/thr_cancel.c Modified: head/lib/libthr/thread/thr_cancel.c ============================================================================== --- head/lib/libthr/thread/thr_cancel.c Wed Jun 19 03:08:01 2013 (r251984) +++ head/lib/libthr/thread/thr_cancel.c Wed Jun 19 04:47:41 2013 (r251985) @@ -87,7 +87,8 @@ _pthread_setcancelstate(int state, int * break; case PTHREAD_CANCEL_ENABLE: curthread->cancel_enable = 1; - testcancel(curthread); + if (curthread->cancel_async) + testcancel(curthread); break; default: return (EINVAL); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"