From owner-cvs-all@FreeBSD.ORG Tue Jan 1 23:39:42 2008 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99DEE16A417; Tue, 1 Jan 2008 23:39:42 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail13.syd.optusnet.com.au (mail13.syd.optusnet.com.au [211.29.132.194]) by mx1.freebsd.org (Postfix) with ESMTP id 2E53B13C459; Tue, 1 Jan 2008 23:39:42 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-219-213.carlnfd3.nsw.optusnet.com.au (c211-30-219-213.carlnfd3.nsw.optusnet.com.au [211.30.219.213]) by mail13.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m01NdZ2u013451 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 2 Jan 2008 10:39:36 +1100 Date: Wed, 2 Jan 2008 10:39:35 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: "M. Warner Losh" In-Reply-To: <20080101.024546.1079618522.imp@bsdimp.com> Message-ID: <20080102092953.J12725@delplex.bde.org> References: <200712311219.08286.jhb@freebsd.org> <20071231.203720.1306324107.imp@bsdimp.com> <20080101161858.A10345@delplex.bde.org> <20080101.024546.1079618522.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: src-committers@FreeBSD.org, jhb@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org, rrs@FreeBSD.org, brde@optusnet.com.au Subject: Re: cvs commit: src/sys/netinet sctp_bsd_addr.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2008 23:39:42 -0000 On Tue, 1 Jan 2008, M. Warner Losh wrote: > In message: <20080101161858.A10345@delplex.bde.org> > Bruce Evans writes: > : PZERO is compatibility cruft which should never be used. Just a few > ... > > Do we want to document the other Pxxxx priorities? Maybe, but not in sleep.9. I just learn about them from *.[ch]. > : Otherwise, PZERO has a completely different meaning from either priority > : 0 (maximal) or the bare 0 arg to msleep. It means some middle priority, > ... > So would the following be a reasonable change to sleep.9? > > Index: sleep.9 > =================================================================== > RCS file: /home/ncvs/src/share/man/man9/sleep.9,v > retrieving revision 1.61 > diff -u -r1.61 sleep.9 > --- sleep.9 30 Mar 2007 18:07:26 -0000 1.61 > +++ sleep.9 1 Jan 2008 09:44:01 -0000 > @@ -93,6 +93,10 @@ > runnable with the specified > .Fa priority > when it resumes. > +.Dv PZERO > +should never be used, as it is for compatibility only. > +A new priority of 0 means to use the thread's current priority when > +it is made runnable again. > If > .Fa priority > includes the Not quite. The sentence about PZERO doesn't belong here. The 2 sentences bfore the PZERO sentence already completely document the specialness of priority 0: % .Pp % The parameter % .Fa priority % specifies a new priority for the thread as well as some optional flags. % If the new priority is not 0, % then the thread will be made % runnable with the specified % .Fa priority % when it resumes. If this is not clear, then I think it should be made clearer by rewording it and not by tacking on a modifying clause. My attempt: %%% .Pp The parameter .Fa priority encodes the new priority for the thread and some optional flags. The thread will be made runnable with the new priority when it resumes. The new priority is determined from .Fa priority by first masking out the flags using the .Dv PRIMASK mask. If the the result of this is nonzero, then it gives the new priority; otherwise, the new priority is same as the current priority. %%% BTW, grep shows that PZERO is only documented in spl.9 of all places, only in examples using the even-more-deprecated tsleep(), while sleep.9 doesn't have any examples. Bruce