From owner-freebsd-doc@FreeBSD.ORG Tue Dec 28 17:40:29 2004 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D7C6916A4CE for ; Tue, 28 Dec 2004 17:40:29 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 76A7F43D45 for ; Tue, 28 Dec 2004 17:40:29 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBSHeTdP082845 for ; Tue, 28 Dec 2004 17:40:29 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBSHeTNb082844; Tue, 28 Dec 2004 17:40:29 GMT (envelope-from gnats) Resent-Date: Tue, 28 Dec 2004 17:40:29 GMT Resent-Message-Id: <200412281740.iBSHeTNb082844@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, n-kogane@syd.odn.ne.jp Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D425616A4CE for ; Tue, 28 Dec 2004 17:31:27 +0000 (GMT) Received: from t-mta2.odn.ne.jp (mfep2.odn.ne.jp [143.90.131.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1FF2E43D3F for ; Tue, 28 Dec 2004 17:31:27 +0000 (GMT) (envelope-from n-kogane@syd.odn.ne.jp) Received: from kces6.koganemaru.co.jp ([210.252.255.207]) by t-mta2.odn.ne.jp with ESMTP id <20041228173126453.LPZF.2654.t-mta2.odn.ne.jp@mta2.odn.ne.jp> for ; Wed, 29 Dec 2004 02:31:26 +0900 Received: by kces6.koganemaru.co.jp (Postfix, from userid 100) id 9187C10221; Wed, 29 Dec 2004 02:35:54 +0000 (GMT) Message-Id: <20041229023554.9187C10221@kces6.koganemaru.co.jp> Date: Wed, 29 Dec 2004 02:35:54 +0000 (GMT) From: n-kogane@syd.odn.ne.jp To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: docs/75581: typos in man3 manual pages, pthread_attr_setcreatesuspend_np.3, pthread_cancel.3, pthread_once.3, pthread_setspecific.3, pthread_testcancel.3, queue.3, X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: n-kogane@syd.odn.ne.jp List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Dec 2004 17:40:30 -0000 >Number: 75581 >Category: docs >Synopsis: typos in man3 manual pages, pthread_attr_setcreatesuspend_np.3, pthread_cancel.3, pthread_once.3, pthread_setspecific.3, pthread_testcancel.3, queue.3, >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Tue Dec 28 17:40:29 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Nobuyuki Koganemaru >Release: FreeBSD 4.11-RC1 i386 >Organization: KOGANEMARU Computer Engineering Service Corporation. >Environment: FreeBSD kcesx3.koganemaru.co.jp 4.10-RELEASE FreeBSD 4.10-RELEASE #0: Tue May 25 22:47:12 GMT 2004 root@perseus.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: I found some typos in pthread_attr_setcreatesuspend_np.3, pthread_cancel.3, pthread_once.3, pthread_setspecific.3, pthread_testcancel.3, queue.3, rand48.3. >How-To-Repeat: Do "man 3 xxxxx". >Fix: diff -u pthread_attr_setcreatesuspend_np.3.orig ./pthread_attr_setcreatesuspend_np.3 --- pthread_attr_setcreatesuspend_np.3.orig Sat Dec 18 00:08:14 2004 +++ ./pthread_attr_setcreatesuspend_np.3 Wed Dec 29 02:26:20 2004 @@ -29,7 +29,7 @@ .Os .Sh NAME .Nm pthread_attr_setcreatesuspend_np -.Nd prepare attribute for creattion of suspended thread +.Nd prepare attribute for creation of suspended thread .Sh LIBRARY .Lb libc_r .Sh SYNOPSIS diff -u pthread_cancel.3.orig ./pthread_cancel.3 --- pthread_cancel.3.orig Sat Dec 18 00:08:14 2004 +++ ./pthread_cancel.3 Wed Dec 29 02:27:02 2004 @@ -17,7 +17,7 @@ function requests that .Fa thread be canceled. -The target thread's cancelability state and type determines +The target thread's cancellability state and type determines when the cancellation takes effect. When the cancellation is acted on, the cancellation cleanup handlers for diff -u pthread_once.3.orig ./pthread_once.3 --- pthread_once.3.orig Sat Dec 18 00:08:14 2004 +++ ./pthread_once.3 Wed Dec 29 02:27:52 2004 @@ -76,7 +76,8 @@ However, if .Fn init_routine is a cancellation point and is cancelled, the effect on -.Fa once_control is as if +.Fa once_control +is as if .Fn pthread_once was never called. .Pp diff -u pthread_setspecific.3.orig ./pthread_setspecific.3 --- pthread_setspecific.3.orig Sat Dec 18 00:08:14 2004 +++ ./pthread_setspecific.3 Wed Dec 29 02:28:34 2004 @@ -49,7 +49,7 @@ .Fa key obtained via a previous call to .Fn pthread_key_create . -Different threads man bind different values to the same key. +Different threads can bind different values to the same key. These values are typically pointers to blocks of dynamically allocated memory that have been reserved for use by the calling thread. diff -u pthread_testcancel.3.orig ./pthread_testcancel.3 --- pthread_testcancel.3.orig Sat Dec 18 00:08:14 2004 +++ ./pthread_testcancel.3 Wed Dec 29 02:32:49 2004 @@ -6,7 +6,7 @@ .Nm pthread_setcancelstate , .Nm pthread_setcanceltype , .Nm pthread_testcancel -.Nd set cancelability state +.Nd set cancellability state .Sh LIBRARY .Lb libc_r .Sh SYNOPSIS @@ -20,14 +20,14 @@ .Sh DESCRIPTION The .Fn pthread_setcancelstate -function atomically both sets the calling thread's cancelability state +function atomically both sets the calling thread's cancellability state to the indicated .Fa state and, if .Fa oldstate is not .Dv NULL , -returns the previous cancelability state at the location referenced by +returns the previous cancellability state at the location referenced by .Fa oldstate . Legal values for .Fa state @@ -38,14 +38,14 @@ .Pp The .Fn pthread_setcanceltype -function atomically both sets the calling thread's cancelability type +function atomically both sets the calling thread's cancellability type to the indicated .Fa type and, if .Fa oldtype is not .Dv NULL , -returns the previous cancelability type at the location referenced by +returns the previous cancellability type at the location referenced by .Fa oldtype . Legal values for .Fa type @@ -54,7 +54,7 @@ and .Dv PTHREAD_CANCEL_ASYNCHRONOUS . .Pp -The cancelability state and type of any newly created threads, including the +The cancellability state and type of any newly created threads, including the thread in which .Fn main was first invoked, are @@ -68,33 +68,35 @@ function creates a cancellation point in the calling thread. The .Fn pthread_testcancel -function has no effect if cancelability is disabled. +function has no effect if cancellability is disabled. .Pp .Ss Cancelability States -The cancelability state of a thread determines the action taken upon +The cancellability state of a thread determines the action taken upon receipt of a cancellation request. The thread may control cancellation in a number of ways. .Pp Each thread maintains its own -.Dq cancelability state +.Dq cancellability state which may be encoded in two bits: .Bl -hang .It Em Cancelability Enable -When cancelability is +.br +When cancellability is .Dv PTHREAD_CANCEL_DISABLE , cancellation requests against the target thread are held pending. .It Em Cancelability Type -When cancelability is enabled and the cancelability type is +.br +When cancellability is enabled and the cancellability type is .Dv PTHREAD_CANCEL_ASYNCHRONOUS , new or pending cancellation requests may be acted upon at any time. -When cancelability is enabled and the cancelability type is +When cancellability is enabled and the cancellability type is .Dv PTHREAD_CANCEL_DEFERRED , cancellation requests are held pending until a cancellation point (see below) is reached. -If cancelability is disabled, the setting of the -cancelability type has no immediate effect as all cancellation requests -are held pending; however, once cancelability is enabled again the new +If cancellability is disabled, the setting of the +cancellability type has no immediate effect as all cancellation requests +are held pending; however, once cancellability is enabled again the new type will be in effect. .El .Ss Cancellation Points @@ -147,27 +149,27 @@ Objects may depend on other objects. .Pp -First, cancelability should only be disabled on entry to an object, never +First, cancellability should only be disabled on entry to an object, never explicitly enabled. -On exit from an object, the cancelability state should +On exit from an object, the cancellability state should always be restored to its value on entry to the object. .Pp This follows from a modularity argument: if the client of an object (or the -client of an object that uses that object) has disabled cancelability, it is +client of an object that uses that object) has disabled cancellability, it is because the client doesn't want to have to worry about how to clean up if the thread is canceled while executing some sequence of actions. If an object -is called in such a state and it enables cancelability and a cancellation +is called in such a state and it enables cancellability and a cancellation request is pending for that thread, then the thread will be canceled, contrary to the wish of the client that disabled. .Pp -Second, the cancelability type may be explicitly set to either +Second, the cancellability type may be explicitly set to either .Em deferred or .Em asynchronous upon entry to an object. -But as with the cancelability state, on exit from -an object that cancelability type should always be restored to its value on +But as with the cancellability state, on exit from +an object that cancellability type should always be restored to its value on entry to the object. .Pp Finally, only functions that are cancel-safe may be called from a thread that diff -u queue.3.orig ./queue.3 --- queue.3.orig Sat Dec 18 00:08:47 2004 +++ ./queue.3 Wed Dec 29 02:36:26 2004 @@ -638,7 +638,7 @@ .Pp The macro .Nm LIST_EMPTY -evaluates to true if their are no elements in the list. +evaluates to true if there are no elements in the list. .Pp The macro .Nm LIST_ENTRY diff -u rand48.3.orig ./rand48.3 --- rand48.3.orig Sat Dec 18 00:08:11 2004 +++ ./rand48.3 Wed Dec 29 02:37:11 2004 @@ -73,7 +73,7 @@ return values of type double. The full 48 bits of r(n+1) are loaded into the mantissa of the returned value, with the exponent set -such that the values produced lie in the interval [0.0, 1.0). +such that the values produced lie in the interval [0.0, 1.0]. .Pp The .Fn lrand48 >Release-Note: >Audit-Trail: >Unformatted: rand48.3.