From owner-svn-src-all@FreeBSD.ORG Sat Jan 5 00:23:27 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 227D2D8D; Sat, 5 Jan 2013 00:23:27 +0000 (UTC) (envelope-from bjk@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 E6794FB7; Sat, 5 Jan 2013 00:23:26 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r050NQwT093190; Sat, 5 Jan 2013 00:23:26 GMT (envelope-from bjk@svn.freebsd.org) Received: (from bjk@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r050NQHO093188; Sat, 5 Jan 2013 00:23:26 GMT (envelope-from bjk@svn.freebsd.org) Message-Id: <201301050023.r050NQHO093188@svn.freebsd.org> From: Benjamin Kaduk Date: Sat, 5 Jan 2013 00:23:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245049 - in head: share/man/man9 sys/kern 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: Sat, 05 Jan 2013 00:23:27 -0000 Author: bjk (doc committer) Date: Sat Jan 5 00:23:26 2013 New Revision: 245049 URL: http://svnweb.freebsd.org/changeset/base/245049 Log: Fix some minor inaccuracies introduced in r243251. Also correct the comment in kern_synch.c which was the source of the problematic text. Reviewed by: kib (previous version) Approved by: hrs (mentor) Modified: head/share/man/man9/sleep.9 head/sys/kern/kern_synch.c Modified: head/share/man/man9/sleep.9 ============================================================================== --- head/share/man/man9/sleep.9 Fri Jan 4 23:44:22 2013 (r245048) +++ head/share/man/man9/sleep.9 Sat Jan 5 00:23:26 2013 (r245049) @@ -102,12 +102,11 @@ If .Fa priority includes the .Dv PCATCH -flag, pending -signals are checked before and after sleeping, otherwise signals are -not checked. +flag, pending signals are allowed to interrupt the sleep, otherwise +pending signals are ignored during the sleep. If .Dv PCATCH -is set and a signal needs to be delivered, +is set and a signal becomes pending, .Er ERESTART is returned if the current system call should be restarted if possible, and @@ -119,9 +118,10 @@ If the .Dv PBDRY flag is specified in addition to .Dv PCATCH , -then the sleeping thread is not stopped upon delivery of +then the sleeping thread is not stopped when .Dv SIGSTOP -or other stop action while it is sleeping. +becomes pending +or some other stop action occurs while it is sleeping. Instead, it is woken up, with the assumption that the stop will occur on reaching a stop point when returning to usermode. Modified: head/sys/kern/kern_synch.c ============================================================================== --- head/sys/kern/kern_synch.c Fri Jan 4 23:44:22 2013 (r245048) +++ head/sys/kern/kern_synch.c Sat Jan 5 00:23:26 2013 (r245049) @@ -133,10 +133,10 @@ sleepinit(void) * General sleep call. Suspends the current thread until a wakeup is * performed on the specified identifier. The thread will then be made * runnable with the specified priority. Sleeps at most timo/hz seconds - * (0 means no timeout). If pri includes PCATCH flag, signals are checked - * before and after sleeping, else signals are not checked. Returns 0 if + * (0 means no timeout). If pri includes the PCATCH flag, let signals + * interrupt the sleep, otherwise ignore them while sleeping. Returns 0 if * awakened, EWOULDBLOCK if the timeout expires. If PCATCH is set and a - * signal needs to be delivered, ERESTART is returned if the current system + * signal becomes pending, ERESTART is returned if the current system * call should be restarted if possible, and EINTR is returned if the system * call should be interrupted by the signal (return EINTR). *