diff options
| author | uwe <uwe@NetBSD.org> | 2012-11-12 23:11:05 +0000 |
|---|---|---|
| committer | uwe <uwe@NetBSD.org> | 2012-11-12 23:11:05 +0000 |
| commit | d3b296805f1993f7e125962442e6ace72bc30592 (patch) | |
| tree | 9927e9475258eb1962906a02829558648e238b5e /lib/libpthread | |
| parent | 355b133f4622bdc08ed9db8ad1673cdf525461c8 (diff) | |
Use
.Vt type var No = Dv INITIALIZER;
to provide examples of static initialization in SYNOPSIS section.
.Va macro does the wrong thing (check groff PostScript output) and the
need for .Pp kludge (now dropped) should have been an indication too.
While here move static initialization example to be right after the
declaration of *_init().
Diffstat (limited to 'lib/libpthread')
| -rw-r--r-- | lib/libpthread/pthread_cond.3 | 5 | ||||
| -rw-r--r-- | lib/libpthread/pthread_mutex.3 | 5 | ||||
| -rw-r--r-- | lib/libpthread/pthread_once.3 | 5 | ||||
| -rw-r--r-- | lib/libpthread/pthread_rwlock.3 | 5 |
4 files changed, 8 insertions, 12 deletions
diff --git a/lib/libpthread/pthread_cond.3 b/lib/libpthread/pthread_cond.3 index 0c87bdf8e39..c1321a66ad6 100644 --- a/lib/libpthread/pthread_cond.3 +++ b/lib/libpthread/pthread_cond.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: pthread_cond.3,v 1.5 2010/07/09 20:56:01 wiz Exp $ +.\" $NetBSD: pthread_cond.3,v 1.6 2012/11/12 23:11:05 uwe Exp $ .\" .\" Copyright (c) 2002, 2008 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -66,6 +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; .Ft int .Fn pthread_cond_destroy "pthread_cond_t *cond" .Ft int @@ -78,8 +79,6 @@ .Ft int .Fn pthread_cond_timedwait "pthread_cond_t * restrict cond" \ "pthread_mutex_t * restrict mutex" "const struct timespec * restrict abstime" -.Pp -.Va pthread_cond_t cond = Dv PTHREAD_COND_INITIALIZER; .\" ---------------------------------------------------------------------------- .Sh DESCRIPTION Condition variables are intended to be used to communicate changes in diff --git a/lib/libpthread/pthread_mutex.3 b/lib/libpthread/pthread_mutex.3 index 0baa452ad05..b6ddcab9363 100644 --- a/lib/libpthread/pthread_mutex.3 +++ b/lib/libpthread/pthread_mutex.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: pthread_mutex.3,v 1.5 2010/07/09 10:55:11 wiz Exp $ +.\" $NetBSD: pthread_mutex.3,v 1.6 2012/11/12 23:11:05 uwe Exp $ .\" .\" Copyright (c) 2002, 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -66,6 +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; .Ft int .Fn pthread_mutex_destroy "pthread_mutex_t *mutex" .Ft int @@ -74,8 +75,6 @@ .Fn pthread_mutex_trylock "pthread_mutex_t *mutex" .Ft int .Fn pthread_mutex_unlock "pthread_mutex_t *mutex" -.Pp -.Va pthread_mutex_t mutex = Dv PTHREAD_MUTEX_INITIALIZER; .\" ---------------------------------------------------------------------------- .Sh DESCRIPTION The diff --git a/lib/libpthread/pthread_once.3 b/lib/libpthread/pthread_once.3 index a8f324dcf86..8c1287f3a94 100644 --- a/lib/libpthread/pthread_once.3 +++ b/lib/libpthread/pthread_once.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: pthread_once.3,v 1.7 2010/07/09 08:51:28 jruoho Exp $ +.\" $NetBSD: pthread_once.3,v 1.8 2012/11/12 23:11:05 uwe Exp $ .\" .\" Copyright (c) 2002 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -67,8 +67,7 @@ .In pthread.h .Ft int .Fn pthread_once "pthread_once_t *once_control" "void (*init_routine)(void)" -.Pp -.Va pthread_once_t once_control = Dv PTHREAD_ONCE_INIT; +.Vt pthread_once_t once_control No = Dv PTHREAD_ONCE_INIT; .Sh DESCRIPTION The first call to .Fn pthread_once diff --git a/lib/libpthread/pthread_rwlock.3 b/lib/libpthread/pthread_rwlock.3 index b9b9b73890e..781c9617da7 100644 --- a/lib/libpthread/pthread_rwlock.3 +++ b/lib/libpthread/pthread_rwlock.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: pthread_rwlock.3,v 1.3 2010/07/09 10:55:11 wiz Exp $ +.\" $NetBSD: pthread_rwlock.3,v 1.4 2012/11/12 23:11:05 uwe Exp $ .\" .\" Copyright (c) 2002, 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -63,8 +63,7 @@ .Ft int .Fn pthread_rwlock_init "pthread_rwlock_t * restrict lock" \ "const pthread_rwlockattr_t * restrict attr" -.Pp -.Va pthread_rwlock_t lock = 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 |
