From owner-svn-src-all@FreeBSD.ORG Wed Nov 5 16:27:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90175AB1; Wed, 5 Nov 2014 16:27:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 7B1E22C1; Wed, 5 Nov 2014 16:27:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sA5GRTSo060161; Wed, 5 Nov 2014 16:27:29 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sA5GRSOh060157; Wed, 5 Nov 2014 16:27:28 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <201411051627.sA5GRSOh060157@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Wed, 5 Nov 2014 16:27:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r274141 - in stable/8: . share/man/man9 sys/sys X-SVN-Group: stable-8 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.18-1 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, 05 Nov 2014 16:27:29 -0000 Author: lwhsu (ports committer) Date: Wed Nov 5 16:27:27 2014 New Revision: 274141 URL: https://svnweb.freebsd.org/changeset/base/274141 Log: MFC r271992 Reflect the chanages in sleepqueue.h and subr_sleepqueue.c - Priority argument is introduced to sleepq_*wait* in r177085 - sleepq_calc_signal_retval is removed from implementation - sleepq_catch_signals is internal now MFC r272475 - Bump .Dd Approved by: kevlo Modified: stable/8/ObsoleteFiles.inc (contents, props changed) stable/8/share/man/man9/Makefile stable/8/share/man/man9/sleepqueue.9 stable/8/sys/sys/sleepqueue.h Directory Properties: stable/8/share/ (props changed) stable/8/share/man/ (props changed) stable/8/share/man/man9/ (props changed) stable/8/sys/ (props changed) stable/8/sys/sys/ (props changed) Modified: stable/8/ObsoleteFiles.inc ============================================================================== --- stable/8/ObsoleteFiles.inc Wed Nov 5 16:26:23 2014 (r274140) +++ stable/8/ObsoleteFiles.inc Wed Nov 5 16:27:27 2014 (r274141) @@ -14,6 +14,9 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20140922: sleepq_calc_signal_retval.9 and sleepq_catch_signals.9 removed +OLD_FILES+=usr/share/man/man9/sleepq_calc_signal_retval.9.gz +OLD_FILES+=usr/share/man/man9/sleepq_catch_signals.9.gz # 20130701: vfs_mount.9 removed OLD_FILES+=usr/share/man/man9/vfs_mount.9.gz # 20110915: rename congestion control manpages Modified: stable/8/share/man/man9/Makefile ============================================================================== --- stable/8/share/man/man9/Makefile Wed Nov 5 16:26:23 2014 (r274140) +++ stable/8/share/man/man9/Makefile Wed Nov 5 16:27:27 2014 (r274141) @@ -1161,8 +1161,6 @@ MLINKS+=sleepqueue.9 init_sleepqueues.9 sleepqueue.9 sleepq_add.9 \ sleepqueue.9 sleepq_alloc.9 \ sleepqueue.9 sleepq_broadcast.9 \ - sleepqueue.9 sleepq_calc_signal_retval.9 \ - sleepqueue.9 sleepq_catch_signals.9 \ sleepqueue.9 sleepq_free.9 \ sleepqueue.9 sleepq_lookup.9 \ sleepqueue.9 sleepq_release.9 \ Modified: stable/8/share/man/man9/sleepqueue.9 ============================================================================== --- stable/8/share/man/man9/sleepqueue.9 Wed Nov 5 16:26:23 2014 (r274140) +++ stable/8/share/man/man9/sleepqueue.9 Wed Nov 5 16:27:27 2014 (r274141) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 25, 2010 +.Dd September 22, 2014 .Dt SLEEPQUEUE 9 .Os .Sh NAME @@ -32,8 +32,6 @@ .Nm sleepq_add , .Nm sleepq_alloc , .Nm sleepq_broadcast , -.Nm sleepq_calc_signal_retval , -.Nm sleepq_catch_signals , .Nm sleepq_free , .Nm sleepq_lock , .Nm sleepq_lookup , @@ -61,10 +59,6 @@ .Fn sleepq_alloc "void" .Ft int .Fn sleepq_broadcast "void *wchan" "int flags" "int pri" "int queue" -.Ft int -.Fn sleepq_calc_signal_retval "int sig" -.Ft int -.Fn sleepq_catch_signals "void *wchan" .Ft void .Fn sleepq_free "struct sleepqueue *sq" .Ft struct sleepqueue * @@ -82,15 +76,15 @@ .Ft u_int .Fn sleepq_sleepcnt "void *wchan" "int queue" .Ft int -.Fn sleepq_timedwait "void *wchan" +.Fn sleepq_timedwait "void *wchan" "int pri" .Ft int -.Fn sleepq_timedwait_sig "void *wchan" "int signal_caught" +.Fn sleepq_timedwait_sig "void *wchan" "int pri" .Ft int .Fn sleepq_type "void *wchan" .Ft void -.Fn sleepq_wait "void *wchan" +.Fn sleepq_wait "void *wchan" "int pri" .Ft int -.Fn sleepq_wait_sig "void *wchan" +.Fn sleepq_wait_sig "void *wchan" "int pri" .Sh DESCRIPTION Sleep queues provide a mechanism for suspending execution of a thread until some condition is met. @@ -231,17 +225,6 @@ The .Fa timo parameter should specify the timeout value in ticks. .Pp -The current thread may be marked interruptible by calling -.Fn sleepq_catch_signals -with -.Fa wchan -set to the wait channel. -This function returns a signal number if there are any pending signals for -the current thread and 0 if there is not a pending signal. -The sleep queue chain associated with argument -.Fa wchan -should have been locked by a prior call to -.Fn sleepq_lock . .Pp Once the thread is ready to suspend, one of the wait functions is called to put the current thread to sleep @@ -268,12 +251,9 @@ The sleep queue chain associated with ar needs to have been locked with a prior call to .Fn sleepq_lock . The -.Fa signal_caught -parameter to -.Fn sleepq_timedwait_sig -specifies if a previous call to -.Fn sleepq_catch_signals -found a pending signal. +.Fa pri +argument is used to set the priority of the thread when it is awakened. +If it is set to zero, the thread's priority is left alone. .Pp When the thread is resumed, the wait functions return a non-zero value if the thread was awakened due to @@ -283,20 +263,6 @@ If the sleep timed out, then is returned. If the sleep was interrupted by something other than a signal, then some other return value will be returned. -If zero is returned after resuming from an interruptible sleep, -then -.Fn sleepq_calc_signal_retval -should be called to determine if the sleep was interrupted by a signal. -If so, -.Fn sleepq_calc_signal_retval -returns -.Er ERESTART -if the interrupting signal is restartable and -.Er EINTR -otherwise. -If the sleep was not interrupted by a signal, -.Fn sleepq_calc_signal_retval -will return 0. .Pp A sleeping thread is normally resumed by the .Fn sleepq_broadcast Modified: stable/8/sys/sys/sleepqueue.h ============================================================================== --- stable/8/sys/sys/sleepqueue.h Wed Nov 5 16:26:23 2014 (r274140) +++ stable/8/sys/sys/sleepqueue.h Wed Nov 5 16:27:27 2014 (r274141) @@ -49,13 +49,6 @@ * call sleepq_set_timeout() after sleepq_add() to setup a timeout. It * should then use one of the sleepq_timedwait() functions to block. * - * If the thread wants to the sleep to be interruptible by signals, it can - * call sleepq_catch_signals() after sleepq_add(). It should then use - * one of the sleepq_wait_sig() functions to block. After the thread has - * been resumed, it should call sleepq_calc_signal_retval() to determine - * if it should return EINTR or ERESTART passing in the value returned from - * the earlier call to sleepq_catch_signals(). - * * A thread is normally resumed from a sleep queue by either the * sleepq_signal() or sleepq_broadcast() functions. Sleepq_signal() wakes * the thread with the highest priority that is sleeping on the specified