From owner-svn-src-head@freebsd.org Thu May 5 10:22:20 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5CA0B2D605; Thu, 5 May 2016 10:22:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 681641226; Thu, 5 May 2016 10:22:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u45AMJeC071422; Thu, 5 May 2016 10:22:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u45AMJNH071419; Thu, 5 May 2016 10:22:19 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201605051022.u45AMJNH071419@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 5 May 2016 10:22:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r299115 - head/share/man/man3 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2016 10:22:20 -0000 Author: kib Date: Thu May 5 10:22:19 2016 New Revision: 299115 URL: https://svnweb.freebsd.org/changeset/base/299115 Log: Warn about consequences of suspending threads in arbitrary state of execution. While there, fix minor nits in markup. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/share/man/man3/pthread_resume_np.3 head/share/man/man3/pthread_suspend_all_np.3 head/share/man/man3/pthread_suspend_np.3 Modified: head/share/man/man3/pthread_resume_np.3 ============================================================================== --- head/share/man/man3/pthread_resume_np.3 Thu May 5 10:20:22 2016 (r299114) +++ head/share/man/man3/pthread_resume_np.3 Thu May 5 10:22:19 2016 (r299115) @@ -57,7 +57,7 @@ function will fail if: The value specified by the .Fa tid argument is invalid. -.It Bq ESRC +.It Bq Er ESRC No thread could be found corresponding to the thread ID specified by the .Fa tid argument. Modified: head/share/man/man3/pthread_suspend_all_np.3 ============================================================================== --- head/share/man/man3/pthread_suspend_all_np.3 Thu May 5 10:20:22 2016 (r299114) +++ head/share/man/man3/pthread_suspend_all_np.3 Thu May 5 10:22:19 2016 (r299115) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 13, 2003 +.Dd May 5, 2016 .Dt PTHREAD_SUSPEND_ALL_NP 3 .Os .Sh NAME @@ -44,6 +44,13 @@ The only exception is the current thread the thread that called the .Fn pthread_suspend_all_np function. +.Pp +It is not safe for the caller of the +.Fn pthread_suspend_all_np +function to use any non-async signal safe functions, besides +.Xr pthread_resume_all_np 3 , +until threads are resumed, unless measures are taken to ensure +that all threads are suspended at safe points. .Sh SEE ALSO .Xr pthread_resume_all_np 3 , .Xr pthread_resume_np 3 , Modified: head/share/man/man3/pthread_suspend_np.3 ============================================================================== --- head/share/man/man3/pthread_suspend_np.3 Thu May 5 10:20:22 2016 (r299114) +++ head/share/man/man3/pthread_suspend_np.3 Thu May 5 10:22:19 2016 (r299115) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 13, 2003 +.Dd May 5, 2016 .Dt PTHREAD_SUSPEND_NP 3 .Os .Sh NAME @@ -40,6 +40,13 @@ The .Fn pthread_suspend_np function, called on an active thread, causes it to suspend. +.Pp +It is not safe for the caller of the +.Fn pthread_suspend_np +function to use any non-async signal safe functions, except +.Xr pthread_resume_np 3 , +until suspended thread is resumed, unless measures are taken to ensure +that the thread is suspended at a safe point. .Sh RETURN VALUES If successful, .Fn pthread_suspend_np @@ -56,7 +63,7 @@ An attempt was made to suspend the curre The value specified by the .Fa tid argument is invalid. -.It Bq ESRC +.It Bq Er ESRC No thread could be found corresponding to the thread ID specified by the .Fa tid argument.