svn commit: r251985 - head/lib/libthr/thread
Konstantin Belousov
kib at FreeBSD.org
Wed Jun 19 04:47:42 UTC 2013
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.kohji at 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);
More information about the svn-src-all
mailing list