From owner-svn-src-all@FreeBSD.ORG Wed Jun 19 04:47:42 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 17CBD999; Wed, 19 Jun 2013 04:47:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 063D11978; Wed, 19 Jun 2013 04:47:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5J4lf3a061111; Wed, 19 Jun 2013 04:47:41 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5J4lfTb061110; Wed, 19 Jun 2013 04:47:41 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201306190447.r5J4lfTb061110@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 19 Jun 2013 04:47:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r251985 - head/lib/libthr/thread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jun 2013 04:47:42 -0000 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 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);