[Midnightbsd-cvs] src [7474] trunk/lib/libthr/thread/thr_cancel.c: The SUSv4tcl requires that pthread_setcancelstate() shall not be a cancellation point.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Fri Mar 18 20:07:46 EDT 2016


Revision: 7474
          http://svnweb.midnightbsd.org/src/?rev=7474
Author:   laffer1
Date:     2016-03-18 20:07:45 -0400 (Fri, 18 Mar 2016)
Log Message:
-----------
The SUSv4tcl requires that pthread_setcancelstate() shall not be a cancellation point. When enabling cancellation, only process the pending cancellatinos for async mode.

Obtained from: FreeBSD

Modified Paths:
--------------
    trunk/lib/libthr/thread/thr_cancel.c

Modified: trunk/lib/libthr/thread/thr_cancel.c
===================================================================
--- trunk/lib/libthr/thread/thr_cancel.c	2016-03-19 00:06:05 UTC (rev 7473)
+++ trunk/lib/libthr/thread/thr_cancel.c	2016-03-19 00:07:45 UTC (rev 7474)
@@ -87,7 +87,8 @@
 		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 Midnightbsd-cvs mailing list