Module Name:    src
Committed By:   wiz
Date:           Tue Jul  5 10:04:17 UTC 2016

Modified Files:
        src/lib/libpthread: pthread_attr_getstack.3 pthread_barrier.3
            pthread_barrierattr.3 pthread_cond.3 pthread_condattr.3
            pthread_mutex.3 pthread_mutexattr.3 pthread_once.3 pthread_rwlock.3
            pthread_rwlockattr.3

Log Message:
Fix some lint.

Too much or too little whitespace;
improve macro usage;
add missing .El;
merge error sections for same error code.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libpthread/pthread_attr_getstack.3 \
    src/lib/libpthread/pthread_barrier.3 src/lib/libpthread/pthread_rwlock.3
cvs rdiff -u -r1.10 -r1.11 src/lib/libpthread/pthread_barrierattr.3 \
    src/lib/libpthread/pthread_condattr.3
cvs rdiff -u -r1.6 -r1.7 src/lib/libpthread/pthread_cond.3
cvs rdiff -u -r1.7 -r1.8 src/lib/libpthread/pthread_mutex.3
cvs rdiff -u -r1.12 -r1.13 src/lib/libpthread/pthread_mutexattr.3
cvs rdiff -u -r1.9 -r1.10 src/lib/libpthread/pthread_once.3 \
    src/lib/libpthread/pthread_rwlockattr.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libpthread/pthread_attr_getstack.3
diff -u src/lib/libpthread/pthread_attr_getstack.3:1.5 src/lib/libpthread/pthread_attr_getstack.3:1.6
--- src/lib/libpthread/pthread_attr_getstack.3:1.5	Fri Jul  9 17:15:59 2010
+++ src/lib/libpthread/pthread_attr_getstack.3	Tue Jul  5 10:04:17 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pthread_attr_getstack.3,v 1.5 2010/07/09 17:15:59 jruoho Exp $
+.\"	$NetBSD: pthread_attr_getstack.3,v 1.6 2016/07/05 10:04:17 wiz Exp $
 .\"
 .\" Copyright (c) 2010 Jukka Ruohonen <jruoho...@iki.fi>
 .\" All rights reserved.
@@ -38,10 +38,10 @@
 .Ft int
 .Fn pthread_attr_getstack \
 "const pthread_attr_t * restrict attr" \
-"void ** restrict stackaddr, size_t * restrict stacksize"
+"void ** restrict stackaddr" "size_t * restrict stacksize"
 .Ft int
 .Fn pthread_attr_setstack \
-"pthread_attr_t * restrict attr" "void *stackaddr, size_t stacksize"
+"pthread_attr_t * restrict attr" "void *stackaddr" "size_t stacksize"
 .Ft int
 .Fn pthread_attr_getstacksize \
 "const pthread_attr_t * restrict attr" "size_t * restrict stacksize"
Index: src/lib/libpthread/pthread_barrier.3
diff -u src/lib/libpthread/pthread_barrier.3:1.5 src/lib/libpthread/pthread_barrier.3:1.6
--- src/lib/libpthread/pthread_barrier.3:1.5	Sun Jul  3 14:24:58 2016
+++ src/lib/libpthread/pthread_barrier.3	Tue Jul  5 10:04:17 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: pthread_barrier.3,v 1.5 2016/07/03 14:24:58 christos Exp $
+.\" $NetBSD: pthread_barrier.3,v 1.6 2016/07/05 10:04:17 wiz Exp $
 .\"
 .\" Copyright (c) 2002, 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -25,7 +25,6 @@
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
 .\" ----------------------------------------------------------------------------
-
 .Dd June 12, 2016
 .Dt PTHREAD_BARRIER 3
 .Os
@@ -48,9 +47,8 @@
 "int * __restrict pshared"
 .Ft int
 .Fn pthread_barrierattr_setpshared "pthread_barrierattr_t * attr" \
-"int pshared" 
+"int pshared"
 .\" ----------------------------------------------------------------------------
-
 .Sh DESCRIPTION
 The
 .Fn pthread_barrier_init
@@ -98,15 +96,14 @@ calls and continue execution.
 .Pp
 .\" -----
 The
-.Fn pthread_barrierattr_getpshared 
+.Fn pthread_barrierattr_getpshared
 function shall obtain the value of the process-shared attribute from the
-attributes object referenced by attr. 
+attributes object referenced by attr.
 The
 .Fn pthread_barrierattr_setpshared
 function shall set the process-shared attribute in an initialized attributes
-object referenced by attr. 
+object referenced by attr.
 .\" ----------------------------------------------------------------------------
-
 .Sh RETURN VALUES
 If successful,
 .Fn pthread_barrier_init
@@ -136,7 +133,7 @@ In the case of failure, an error value w
 .\" -----
 If successful,
 .Fn pthread_barrierattr_getpshared
-shall return zero and store the value of the process-shared attribute of attr 
+shall return zero and store the value of the process-shared attribute of attr
 into the object referenced by the
 .Fa pshared
 parameter.
@@ -146,9 +143,8 @@ Otherwise, an error number shall be retu
 If successful,
 .Fn pthread_barrierattr_setpshared
 shall return zero;
-Otherwise, an error number shall be returned to indicate the error. 
+Otherwise, an error number shall be returned to indicate the error.
 .\" ----------------------------------------------------------------------------
-
 .Sh ERRORS
 The
 .Fn pthread_barrier_init
@@ -189,9 +185,9 @@ is invalid.
 .El
 .Pp
 .\" -----
-The 
+The
 .Fn pthread_barrierattr_setpshared
-function and 
+function and
 the
 .Fn pthread_barrierattr_getpshared
 function may fail if:
@@ -200,7 +196,7 @@ function may fail if:
 The value specified by
 .Fa attr
 is invalid.
-
+.El
 .\" ---------------------------------------------------------------------------
 .Sh SEE ALSO
 .Xr pthread_barrierattr 3 ,
Index: src/lib/libpthread/pthread_rwlock.3
diff -u src/lib/libpthread/pthread_rwlock.3:1.5 src/lib/libpthread/pthread_rwlock.3:1.6
--- src/lib/libpthread/pthread_rwlock.3:1.5	Mon Nov 12 23:34:50 2012
+++ src/lib/libpthread/pthread_rwlock.3	Tue Jul  5 10:04:17 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: pthread_rwlock.3,v 1.5 2012/11/12 23:34:50 uwe Exp $
+.\" $NetBSD: pthread_rwlock.3,v 1.6 2016/07/05 10:04:17 wiz Exp $
 .\"
 .\" Copyright (c) 2002, 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -63,7 +63,7 @@
 .Ft int
 .Fn pthread_rwlock_init "pthread_rwlock_t * restrict lock" \
 "const pthread_rwlockattr_t * restrict attr"
-.Vt pthread_rwlock_t lock No = Dv PTHREAD_RWLOCK_INITIALIZER;
+.Vt pthread_rwlock_t lock No = Dv PTHREAD_RWLOCK_INITIALIZER ;
 .Ft int
 .Fn pthread_rwlock_destroy "pthread_rwlock_t *lock"
 .Ft int

Index: src/lib/libpthread/pthread_barrierattr.3
diff -u src/lib/libpthread/pthread_barrierattr.3:1.10 src/lib/libpthread/pthread_barrierattr.3:1.11
--- src/lib/libpthread/pthread_barrierattr.3:1.10	Sun Jul  3 14:24:58 2016
+++ src/lib/libpthread/pthread_barrierattr.3	Tue Jul  5 10:04:17 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: pthread_barrierattr.3,v 1.10 2016/07/03 14:24:58 christos Exp $
+.\" $NetBSD: pthread_barrierattr.3,v 1.11 2016/07/05 10:04:17 wiz Exp $
 .\"
 .\" Copyright (c) 2002 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -64,15 +64,14 @@ function destroys
 The
 .Fn pthread_barrierattr_getpshared
 function shall obtain the value of the process-shared attribute
-from the attributes object referenced by 
+from the attributes object referenced by
 .Fa attr .
 .Pp
 The
 .Fn pthread_barrierattr_setpshared
 function shall set the process-shared attribute in an initialized
-attributes object referenced by 
+attributes object referenced by
 .Fa attr .
-
 .Sh RETURN VALUES
 If successful, these functions return 0.
 Otherwise, an error number is returned to indicate the error.
@@ -98,7 +97,7 @@ may fail if:
 .Bl -tag -width Er
 .It Bq Er EINVAL
 The value specified by
-.Fa attr 
+.Fa attr
 is invalid.
 .El
 .Sh SEE ALSO
Index: src/lib/libpthread/pthread_condattr.3
diff -u src/lib/libpthread/pthread_condattr.3:1.10 src/lib/libpthread/pthread_condattr.3:1.11
--- src/lib/libpthread/pthread_condattr.3:1.10	Sun Jul  3 14:24:58 2016
+++ src/lib/libpthread/pthread_condattr.3	Tue Jul  5 10:04:17 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: pthread_condattr.3,v 1.10 2016/07/03 14:24:58 christos Exp $
+.\" $NetBSD: pthread_condattr.3,v 1.11 2016/07/05 10:04:17 wiz Exp $
 .\"
 .\" Copyright (c) 2002 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -54,10 +54,10 @@
 .Dt PTHREAD_CONDATTR 3
 .Os
 .Sh NAME
-.Nm pthread_condattr_init, 
-.Nm pthread_condattr_getpshared,
-.Nm pthread_condattr_setpshared,
-.Nm pthread_condattr_getclock,
+.Nm pthread_condattr_init ,
+.Nm pthread_condattr_getpshared ,
+.Nm pthread_condattr_setpshared ,
+.Nm pthread_condattr_getclock ,
 .Nm pthread_condattr_setclock
 .Nd condition attribute operations
 .Sh LIBRARY
@@ -89,10 +89,10 @@ and the
 function destroys a condition attribute object.
 The
 .Fn pthread_condattr_getclock
-function shall obtain the value of the 
+function shall obtain the value of the
 .Fa clock
 attributes object referenced by
-.Fa attr.
+.Fa attr .
 The
 .Fn pthread_condattr_setclock
 function sets the system clock to be used for time comparisons to
@@ -105,14 +105,14 @@ and
 (the default).
 The
 .Fn pthread_condattr_getpshared
-function shall obtain the value of the process-shared attribute from the 
+function shall obtain the value of the process-shared attribute from the
 attributes object referenced by
-.Fa attr.
+.Fa attr .
 The
 .Fn pthread_condattr_setpshared
-function shall set the process-shared attribute in an initialized attributes 
-object referenced by 
-.Fa attr.
+function shall set the process-shared attribute in an initialized attributes
+object referenced by
+.Fa attr .
 .Sh RETURN VALUES
 If successful, these functions return 0.
 Otherwise, an error number is returned to indicate the error.
@@ -131,14 +131,15 @@ is invalid.
 .El
 .Pp
 The
-.Fn pthread_condattr_getclock 
+.Fn pthread_condattr_getclock
 and
 .Fn pthread_condattr_setclock
 may fail if:
 .Bl -tag -width Er
 .It Bq Er EINVAL
 The value specified by
-.Fa attr is invalid.
+.Fa attr
+is invalid.
 .El
 .Pp
 The
@@ -151,6 +152,7 @@ may fail if:
 The value specified by
 .Fa attr
 is invalid.
+.El
 .Sh SEE ALSO
 .Xr pthread_cond_init 3
 .Sh STANDARDS

Index: src/lib/libpthread/pthread_cond.3
diff -u src/lib/libpthread/pthread_cond.3:1.6 src/lib/libpthread/pthread_cond.3:1.7
--- src/lib/libpthread/pthread_cond.3:1.6	Mon Nov 12 23:11:05 2012
+++ src/lib/libpthread/pthread_cond.3	Tue Jul  5 10:04:17 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: pthread_cond.3,v 1.6 2012/11/12 23:11:05 uwe Exp $
+.\" $NetBSD: pthread_cond.3,v 1.7 2016/07/05 10:04:17 wiz Exp $
 .\"
 .\" Copyright (c) 2002, 2008 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -66,7 +66,7 @@
 .Ft int
 .Fn pthread_cond_init "pthread_cond_t * restrict cond" \
 "const pthread_condattr_t * restrict attr"
-.Vt pthread_cond_t cond No = Dv PTHREAD_COND_INITIALIZER;
+.Vt pthread_cond_t cond No = Dv PTHREAD_COND_INITIALIZER ;
 .Ft int
 .Fn pthread_cond_destroy "pthread_cond_t *cond"
 .Ft int

Index: src/lib/libpthread/pthread_mutex.3
diff -u src/lib/libpthread/pthread_mutex.3:1.7 src/lib/libpthread/pthread_mutex.3:1.8
--- src/lib/libpthread/pthread_mutex.3:1.7	Sun Jul  3 14:24:58 2016
+++ src/lib/libpthread/pthread_mutex.3	Tue Jul  5 10:04:17 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: pthread_mutex.3,v 1.7 2016/07/03 14:24:58 christos Exp $
+.\" $NetBSD: pthread_mutex.3,v 1.8 2016/07/05 10:04:17 wiz Exp $
 .\"
 .\" Copyright (c) 2002, 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -66,7 +66,7 @@
 .Ft int
 .Fn pthread_mutex_init "pthread_mutex_t * restrict mutex" \
 "const pthread_mutexattr_t * restrict attr"
-.Vt pthread_mutex_t mutex No = Dv PTHREAD_MUTEX_INITIALIZER;
+.Vt pthread_mutex_t mutex No = Dv PTHREAD_MUTEX_INITIALIZER ;
 .Ft int
 .Fn pthread_mutex_destroy "pthread_mutex_t *mutex"
 .Ft int
@@ -82,7 +82,6 @@
 .Ft int
 .Fn pthread_mutex_setprioceiling "pthread_mutex_t * __restrict mutex" \
 "int prioceiling" "int * __restrict old_ceiling"
-
 .\" ----------------------------------------------------------------------------
 .Sh DESCRIPTION
 The
@@ -145,18 +144,18 @@ that has not been locked by it, or if a 
 a mutex that is already unlocked.
 .Pp
 .\" -----
-The 
+The
 .Fn pthread_mutex_timedlock
 function shall lock the mutex object referenced by
-.Fa mutex.
+.Fa mutex .
 If the mutex is already locked, the calling thread shall block until
-the mutex becomes available in the 
+the mutex becomes available in the
 .Fn pthread_mutex_lock
 function.
 If the mutex cannot be locked without waiting for another thread to
 unlock the mutex, this wait shall be terminated when the specified timeout
 expires.
-The timeout shall expire when the absolute time specified by 
+The timeout shall expire when the absolute time specified by
 .Fa timeout
 passes, as measured by the clock on which timeouts are based.
 .Pp
@@ -166,7 +165,7 @@ The
 function shall return the current priority ceiling of the mutex.
 .Pp
 .\" -----
-The 
+The
 .Fn pthread_mutex_setprioceiling
 function shall either lock the mutex if it is unlocked, or block until
 it can sucessfully lock the mutex, then it shall change the mutex's priority
@@ -174,14 +173,13 @@ ceiling and release the mutex.
 When the change is successful, the previous value of the priority ceiling
 shall be returned
 in
-.Fa old_ceiling.
+.Fa old_ceiling .
 The process of locking the mutex need not adhere to the priority
 protect protocol.
 If
 .Fn pthread_mutex_setprioceiling
 function fails, the mutex priority ceiling shall not be changed.
 .\" ----------------------------------------------------------------------------
-
 .Sh RETURN VALUES
 Upon success all described functions return zero.
 Otherwise, an error number will be returned to indicate the error.
@@ -258,9 +256,8 @@ may fail if:
 The mutex was created with the protocol attribute having the value
 .Dv PTHREAD_PRIO_PROTECT
 and the calling thread's priority is higher than
-the mutex current priority ceiling.
-.It Bq Er EINVAL
-The process or thread would have blocked, and the
+the mutex current priority ceiling; or
+the process or thread would have blocked, and the
 .Fa timeout
 parameter specified a nanoseconds field value less than zero or greater
 than or equal to 1000 million.
@@ -271,23 +268,21 @@ The mutex could not be locked before the
 .\" -----
 The
 .Fn pthread_mutex_getprioceiling
-and 
+and
 .Fn pthread_mutex_setprioceiling
 functions may fail if:
 .Bl -tag -width Er
 .It Bq Er EINVAL
-The priority requested by 
+The priority requested by
 .Fa prioceiling
-is out of range.
-.It Bq Er EINVAL
-The value specified by 
+is out of range; or
+the value specified by
 .Fa mutex
 does not refer to a currently existing mutex.
 .It Bq Er EPERM
 The caller does not have the privilege to perform the operation.
-
+.El
 .\" ----------------------------------------------------------------------------
-
 .Sh SEE ALSO
 .Xr pthread 3 ,
 .Xr pthread_barrier 3 ,

Index: src/lib/libpthread/pthread_mutexattr.3
diff -u src/lib/libpthread/pthread_mutexattr.3:1.12 src/lib/libpthread/pthread_mutexattr.3:1.13
--- src/lib/libpthread/pthread_mutexattr.3:1.12	Sun Jul  3 14:24:58 2016
+++ src/lib/libpthread/pthread_mutexattr.3	Tue Jul  5 10:04:17 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: pthread_mutexattr.3,v 1.12 2016/07/03 14:24:58 christos Exp $
+.\" $NetBSD: pthread_mutexattr.3,v 1.13 2016/07/05 10:04:17 wiz Exp $
 .\"
 .\" Copyright (c) 2002, 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -183,33 +183,33 @@ pointed to by the second parameter.
 .Pp
 The
 .Fn pthread_mutexattr_getpshared
-function obtains the value of the process-shared attribute from 
-the attributes object referenced by 
-.Fa attr.
+function obtains the value of the process-shared attribute from
+the attributes object referenced by
+.Fa attr .
 .Pp
-The 
+The
 .Fn pthread_mutexattr_setpshared
 function is used to set the process-shared attribute in an initialised
 attributes object referenced by
-.Fa attr.
+.Fa attr .
 .Pp
-The 
+The
 .Fn pthread_mutexattr_getprotocol
 and
 .Fn pthread_mutexattr_setprotocol
-functions shall get and set the protocol attribute of a mutex attributes 
+functions shall get and set the protocol attribute of a mutex attributes
 object pointed to by
-.Fa attr 
+.Fa attr
 which was previously created by the function
 .Fn pthread_mutexattr_init .
 .Pp
-The 
+The
 .Fn pthread_mutexattr_getprioceiling
 and
 .Fn pthread_mutexattr_setprioceiling
 functions, shall get and set the priority ceiling attribute of a mutex attributes
-object pointed to by 
-.Fa attr 
+object pointed to by
+.Fa attr
 which was previously created by the function
 .Fn pthread_mutexattr_init .
 .Sh RETURN VALUES
@@ -278,17 +278,16 @@ Invalid value for
 .Fa attr .
 .El
 .Pp
-.El
-.Pp
 .Fn pthread_mutexattr_getpshared
-and 
+and
 .Fn pthread_mutexattr_setpshared
 may fail if:
 .Bl -tag -width Er
 .It Bq Er EINVAL
-the value specified by 
+the value specified by
 .Fa attr
 is invalid.
+.El
 .Sh SEE ALSO
 .Xr pthread_mutex_init 3
 .Sh STANDARDS

Index: src/lib/libpthread/pthread_once.3
diff -u src/lib/libpthread/pthread_once.3:1.9 src/lib/libpthread/pthread_once.3:1.10
--- src/lib/libpthread/pthread_once.3:1.9	Mon Nov 12 23:28:11 2012
+++ src/lib/libpthread/pthread_once.3	Tue Jul  5 10:04:17 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: pthread_once.3,v 1.9 2012/11/12 23:28:11 uwe Exp $
+.\" $NetBSD: pthread_once.3,v 1.10 2016/07/05 10:04:17 wiz Exp $
 .\"
 .\" Copyright (c) 2002 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -67,25 +67,25 @@
 .In pthread.h
 .Ft int
 .Fn pthread_once "pthread_once_t *once_control" "void (*init_routine)(void)"
-.Vt pthread_once_t once_control No = Dv PTHREAD_ONCE_INIT;
+.Vt pthread_once_t once_control No = Dv PTHREAD_ONCE_INIT ;
 .Sh DESCRIPTION
 The first call to
 .Fn pthread_once
 by any thread in a process, with a given
 .Fa once_control ,
 will call the
-.Fa init_routine Ns ()
+.Fn init_routine
 with no arguments.
 Subsequent calls to
 .Fn pthread_once
 with the same
 .Fa once_control
 will not call the
-.Fa init_routine Ns ().
+.Fn init_routine
 On return from
 .Fn pthread_once ,
 it is guaranteed that
-.Fa init_routine Ns ()
+.Fn init_routine
 has completed.
 The
 .Fa once_control
@@ -96,7 +96,7 @@ The function
 .Fn pthread_once
 is not a cancellation point.
 However, if
-.Fa init_routine Ns ()
+.Fn init_routine
 is a cancellation point and is cancelled, the effect on
 .Fa once_control
 is as if
Index: src/lib/libpthread/pthread_rwlockattr.3
diff -u src/lib/libpthread/pthread_rwlockattr.3:1.9 src/lib/libpthread/pthread_rwlockattr.3:1.10
--- src/lib/libpthread/pthread_rwlockattr.3:1.9	Sun Jul  3 14:24:58 2016
+++ src/lib/libpthread/pthread_rwlockattr.3	Tue Jul  5 10:04:17 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: pthread_rwlockattr.3,v 1.9 2016/07/03 14:24:58 christos Exp $
+.\" $NetBSD: pthread_rwlockattr.3,v 1.10 2016/07/05 10:04:17 wiz Exp $
 .\"
 .\" Copyright (c) 2002 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -84,15 +84,15 @@ The
 .Fn pthread_rwlockattr_getpshared
 function shall obtain the value of process-shared attribute from
 the initialized attributes object referenced by
-.Fa attr.
+.Fa attr .
 .Pp
 The
 .Fn pthread_rwlockattr_setpshared
 function shall set the process-shared attribute in an initialized
 attributes object referenced by
-.Fa attr.
+.Fa attr .
 .Sh RETURN VALUES
-If successful, 
+If successful,
 all these functions return zero.
 Otherwise an error number will be returned to indicate the error.
 .Sh ERRORS

Reply via email to