svn commit: r245049 - in head: share/man/man9 sys/kern

Benjamin Kaduk bjk at FreeBSD.org
Sat Jan 5 00:23:27 UTC 2013


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).
  *


More information about the svn-src-head mailing list