Subject: kern/29997: fixes for native thread man pages
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <igor@string1.ciencias.uniovi.es>
List: netbsd-bugs
Date: 04/17/2005 12:34:01
>Number:         29997
>Category:       kern
>Synopsis:       fixes for native thread man pages
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 17 12:34:01 +0000 2005
>Originator:     Igor Sobrado
>Release:        NetBSD 2.0.2
>Organization:
University of Oviedo
>Environment:
System: NetBSD localhost 2.0.2 NetBSD 2.0.2 (GENERIC_LAPTOP) #0: Wed Mar 23 08:59:09 UTC 2005 jmc@faith.netbsd.org:/home/builds/ab/netbsd-2-0-2-RELEASE/i386/200503220140Z-obj/home/builds/ab/netbsd-2-0-2-RELEASE/src/sys/arch/i386/compile/GENERIC_LAPTOP i386
Architecture: i386
Machine: i386
>Description:
	There are both errors and typos in the native threads man pages:

	In pthread_attr_init(3): both pthread_attr_setschedparam(3) and
	    pthread_attr_getschedparam(3) are referenced but do not exist.
	    These man entries should be links to pthread_attr.3

	In pthread_barrierattr(3): both pthread_barrierattr_init(3) and
	    pthread_barrierattr_destroy(3) are referenced but do not exist.
	    These man entries should be links to pthread_barrierattr.3.
	    The filename is pthread_barierattr.3 (it looks wrong to me).
	    I think that this problem is fixed in cvsweb.netbsd.org now,
	    but I am not running -current.  Is it fixed?

	In pthread_spin_lock(3): pthread_spin_trylock(3) is referenced
	    but it does not exist.  This man entry should be a link to
	    pthread_spin_lock.3

	Typos have patches added to this problem report.  Beware, I am not
        English native speaker!

        I am only providing patches for typos, not broken references!!!

>How-To-Repeat:
>Fix:

--- pthread_barrier_destroy.3	2005-04-17 13:48:11.000000000 +0200
+++ pthread_barrier_destroy.3.proposed	2005-04-17 13:49:03.000000000 +0200
@@ -29,7 +29,7 @@
 .Dt PTHREAD_BARRIER_DESTROY 3
 .Os
 .Sh NAME
-.Nm pthread_barrier_destory
+.Nm pthread_barrier_destroy
 .Nd destroy a barrier
 .Sh LIBRARY
 .Lb libpthread


--- pthread_barrier_init.3	2005-04-17 13:44:45.000000000 +0200
+++ pthread_barrier_init.3.proposed	2005-04-17 13:45:32.000000000 +0200
@@ -68,7 +68,7 @@
 .Fa count
 is zero.
 .It Bq Er ENOMEM
-Insufficent memory exists to initialize the barrier.
+Insufficient memory exists to initialize the barrier.
 .El
 .Pp
 .Fn pthread_barrier_init


--- pthread_barrier_wait.3	2005-04-17 13:49:55.000000000 +0200
+++ pthread_barrier_wait.3.proposed	2005-04-17 13:51:25.000000000 +0200
@@ -56,8 +56,8 @@
 will return zero for all waiting threads except for one.  One thread will
 receive status
 .Dv PTHREAD_BARRIER_SERIAL_THREAD ,
-which is intended to indicate that this thead may be used to update
-shared data.  It is the responsibilty of this thread to insure the visibility and atomicity of any updates to shared data with respect to the other threads participating in the barrier.
+which is intended to indicate that this thread may be used to update
+shared data.  It is the responsibility of this thread to insure the visibility and atomicity of any updates to shared data with respect to the other threads participating in the barrier.
 In the case of failure, an error value will be returned.
 .Sh ERRORS
 .Fn pthread_barrier_wait


--- pthread_barrierattr.3	2005-04-17 14:25:01.000000000 +0200
+++ pthread_barrierattr.3.proposed	2005-04-17 14:25:47.000000000 +0200
@@ -65,7 +65,7 @@
 shall fail if:
 .Bl -tag -width Er
 .It Bq Er ENOMEM
-Insufficent memory exists to initialize the barrier attributes object.
+Insufficient memory exists to initialize the barrier attributes object.
 .El
 .Pp
 .Fn pthread_barrierattr_init


--- pthread_cond_broadcast.3	2005-04-17 13:52:24.000000000 +0200
+++ pthread_cond_broadcast.3.proposed	2005-04-17 13:53:13.000000000 +0200
@@ -77,7 +77,7 @@
 If no threads are waiting on
 .Fa cond ,
 the
-.Fn pthead_cond_broadcast
+.Fn pthread_cond_broadcast
 function has no effect.
 .Pp
 The
@@ -87,7 +87,7 @@
 If no threads are waiting on
 .Fa cond ,
 the
-.Fn pthead_cond_signal
+.Fn pthread_cond_signal
 function has no effect.
 .Sh RETURN VALUES
 If successful, the


--- pthread_cond_init.3	2005-04-17 13:53:43.000000000 +0200
+++ pthread_cond_init.3.proposed	2005-04-17 13:54:46.000000000 +0200
@@ -77,7 +77,7 @@
 .Pp
 Condition variables are intended to be used to communicate changes in
 the state of data shared between threads.  Condition variables are
-always associated with a mutex to provide syncronized access to the
+always associated with a mutex to provide synchronized access to the
 shared data.  A single predicate should always be associated with a
 condition variable.  The predicate should identify a state of the
 shared data that must be true before the thread proceeds.


--- pthread_condattr.3	2005-04-17 13:29:13.000000000 +0200
+++ pthread_condattr.3.proposed	2005-04-17 13:36:44.000000000 +0200
@@ -86,7 +86,7 @@
 shall fail if:
 .Bl -tag -width Er
 .It Bq Er ENOMEM
-Insufficent memory exists to initialize the condition attribute object.
+Insufficient memory exists to initialize the condition attribute object.
 .El
 .Pp
 .Fn pthread_condattr_destroy


--- pthread_mutexattr.3	2005-04-17 13:31:23.000000000 +0200
+++ pthread_mutexattr.3.proposed	2005-04-17 13:39:09.000000000 +0200
@@ -134,7 +134,7 @@
 attempts to unlock a
 .Dv PTHREAD_MUTEX_ERRORCHECK
 mutex that is locked by another thread, an error will be returned.  If a
-thread attemps to unlock a
+thread attempts to unlock a
 .Dv PTHREAD_MUTEX_ERRORCHECK
 thread that is unlocked, an error will be
 returned.
@@ -149,7 +149,7 @@
 calls are needed before the mutex will wake another thread waiting on this
 lock.  If a thread attempts to unlock a
 .Dv PTHREAD_MUTEX_RECURSIVE
-mutex that is locked by another thread, an error will be returned.  If a thread attemps to unlock a
+mutex that is locked by another thread, an error will be returned.  If a thread attempts to unlock a
 .Dv PTHREAD_MUTEX_RECURSIVE
 thread that is unlocked, an error will be returned.
 .Pp
@@ -172,7 +172,7 @@
 shall fail if:
 .Bl -tag -width Er
 .It Bq Er ENOMEM
-Insufficent memory exists to initialize the mutex attributes object.
+Insufficient memory exists to initialize the mutex attributes object.
 .El
 .Pp
 .Fn pthread_mutexattr_settype


--- pthread_rwlockattr.3	2005-04-17 13:57:08.000000000 +0200
+++ pthread_rwlockattr.3.proposed	2005-04-17 13:59:09.000000000 +0200
@@ -88,7 +88,7 @@
 shall fail if:
 .Bl -tag -width Er
 .It Bq Er ENOMEM
-Insufficent memory exists to initialize the read/write lock attributes object.
+Insufficient memory exists to initialize the read/write lock attributes object.
 .El
 .Pp
 .Fn pthread_rwlockattr_init


--- pthread_spin_init.3	2005-04-17 13:33:59.000000000 +0200
+++ pthread_spin_init.3.proposed	2005-04-17 13:58:31.000000000 +0200
@@ -60,7 +60,7 @@
 function shall fail if:
 .Bl -tag -width Er
 .It Bq Er ENOMEM
-Insuffucent memory exists to initialize the lock.
+Insufficient memory exists to initialize the lock.
 .El
 .Pp
 The


*** NOTE *** pthread_atfork.3 has two typos:

  1. registerd -> registered
  2. Insufficent -> Insufficient
       (it would be easier making this spell correct for English speakers
       than fixing it on each page it appears!)

  but I have not find the source page using cvsweb, sorry.  Please, fix
  it too.


*** NOTE ***

  pthread_barierattr_destroy.3 and pthread_barierattr_init.3 (perhaps
  pthread_barrierattr.3???) have the "Insufficent" typo too.  I haven't
  find this file in the repository too.  Please, fix it.