Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libpthread Fix some lint.



details:   https://anonhg.NetBSD.org/src/rev/86b378cdfb15
branches:  trunk
changeset: 346290:86b378cdfb15
user:      wiz <wiz%NetBSD.org@localhost>
date:      Tue Jul 05 10:04:17 2016 +0000

description:
Fix some lint.

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

diffstat:

 lib/libpthread/pthread_attr_getstack.3 |   6 ++--
 lib/libpthread/pthread_barrier.3       |  24 +++++++++-------------
 lib/libpthread/pthread_barrierattr.3   |   9 +++----
 lib/libpthread/pthread_cond.3          |   4 +-
 lib/libpthread/pthread_condattr.3      |  30 +++++++++++++++-------------
 lib/libpthread/pthread_mutex.3         |  35 ++++++++++++++-------------------
 lib/libpthread/pthread_mutexattr.3     |  31 ++++++++++++++---------------
 lib/libpthread/pthread_once.3          |  12 +++++-----
 lib/libpthread/pthread_rwlock.3        |   4 +-
 lib/libpthread/pthread_rwlockattr.3    |   8 +++---
 10 files changed, 77 insertions(+), 86 deletions(-)

diffs (truncated from 531 to 300 lines):

diff -r f1ba522f72bd -r 86b378cdfb15 lib/libpthread/pthread_attr_getstack.3
--- a/lib/libpthread/pthread_attr_getstack.3    Tue Jul 05 09:51:10 2016 +0000
+++ b/lib/libpthread/pthread_attr_getstack.3    Tue Jul 05 10:04:17 2016 +0000
@@ -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 <jruohonen%iki.fi@localhost>
 .\" 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"
diff -r f1ba522f72bd -r 86b378cdfb15 lib/libpthread/pthread_barrier.3
--- a/lib/libpthread/pthread_barrier.3  Tue Jul 05 09:51:10 2016 +0000
+++ b/lib/libpthread/pthread_barrier.3  Tue Jul 05 10:04:17 2016 +0000
@@ -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 @@
 .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 @@
 .\" -----
 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 @@
 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 @@
 .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 @@
 The value specified by
 .Fa attr
 is invalid.
-
+.El
 .\" ---------------------------------------------------------------------------
 .Sh SEE ALSO
 .Xr pthread_barrierattr 3 ,
diff -r f1ba522f72bd -r 86b378cdfb15 lib/libpthread/pthread_barrierattr.3
--- a/lib/libpthread/pthread_barrierattr.3      Tue Jul 05 09:51:10 2016 +0000
+++ b/lib/libpthread/pthread_barrierattr.3      Tue Jul 05 10:04:17 2016 +0000
@@ -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 @@
 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 @@
 .Bl -tag -width Er
 .It Bq Er EINVAL
 The value specified by
-.Fa attr 
+.Fa attr
 is invalid.
 .El
 .Sh SEE ALSO
diff -r f1ba522f72bd -r 86b378cdfb15 lib/libpthread/pthread_cond.3
--- a/lib/libpthread/pthread_cond.3     Tue Jul 05 09:51:10 2016 +0000
+++ b/lib/libpthread/pthread_cond.3     Tue Jul 05 10:04:17 2016 +0000
@@ -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
diff -r f1ba522f72bd -r 86b378cdfb15 lib/libpthread/pthread_condattr.3
--- a/lib/libpthread/pthread_condattr.3 Tue Jul 05 09:51:10 2016 +0000
+++ b/lib/libpthread/pthread_condattr.3 Tue Jul 05 10:04:17 2016 +0000
@@ -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 @@
 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 @@
 (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 @@
 .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 @@
 The value specified by
 .Fa attr
 is invalid.
+.El
 .Sh SEE ALSO
 .Xr pthread_cond_init 3
 .Sh STANDARDS
diff -r f1ba522f72bd -r 86b378cdfb15 lib/libpthread/pthread_mutex.3
--- a/lib/libpthread/pthread_mutex.3    Tue Jul 05 09:51:10 2016 +0000
+++ b/lib/libpthread/pthread_mutex.3    Tue Jul 05 10:04:17 2016 +0000
@@ -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 @@
 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 @@
 function shall return the current priority ceiling of the mutex.
 .Pp
 .\" -----



Home | Main Index | Thread Index | Old Index