Module Name: src Committed By: wiz Date: Fri Jul 9 10:55:11 UTC 2010
Modified Files: src/lib/libpthread: pthread_cond.3 pthread_join.3 pthread_key_create.3 pthread_mutex.3 pthread_rwlock.3 pthread_sigmask.3 pthread_spin.3 Log Message: Mark up NULL. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libpthread/pthread_cond.3 \ src/lib/libpthread/pthread_rwlock.3 cvs rdiff -u -r1.5 -r1.6 src/lib/libpthread/pthread_join.3 \ src/lib/libpthread/pthread_key_create.3 cvs rdiff -u -r1.4 -r1.5 src/lib/libpthread/pthread_mutex.3 \ src/lib/libpthread/pthread_spin.3 cvs rdiff -u -r1.8 -r1.9 src/lib/libpthread/pthread_sigmask.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_cond.3 diff -u src/lib/libpthread/pthread_cond.3:1.2 src/lib/libpthread/pthread_cond.3:1.3 --- src/lib/libpthread/pthread_cond.3:1.2 Thu Jul 8 21:34:06 2010 +++ src/lib/libpthread/pthread_cond.3 Fri Jul 9 10:55:11 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: pthread_cond.3,v 1.2 2010/07/08 21:34:06 wiz Exp $ +.\" $NetBSD: pthread_cond.3,v 1.3 2010/07/09 10:55:11 wiz Exp $ .\" .\" Copyright (c) 2002, 2008 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -88,7 +88,9 @@ .Fa attr . If .Fa attr -is NULL the default attributes are used. +is +.Dv NULL +the default attributes are used. .Pp Condition variables are intended to be used to communicate changes in the state of data shared between threads. Index: src/lib/libpthread/pthread_rwlock.3 diff -u src/lib/libpthread/pthread_rwlock.3:1.2 src/lib/libpthread/pthread_rwlock.3:1.3 --- src/lib/libpthread/pthread_rwlock.3:1.2 Thu Jul 8 21:34:48 2010 +++ src/lib/libpthread/pthread_rwlock.3 Fri Jul 9 10:55:11 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: pthread_rwlock.3,v 1.2 2010/07/08 21:34:48 wiz Exp $ +.\" $NetBSD: pthread_rwlock.3,v 1.3 2010/07/09 10:55:11 wiz Exp $ .\" .\" Copyright (c) 2002, 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -92,7 +92,9 @@ .Fa attr . If .Fa attr -is NULL, the default read/write lock attributes are used. +is +.Dv NULL , +the default read/write lock attributes are used. .Pp The results of calling .Fn pthread_rwlock_init Index: src/lib/libpthread/pthread_join.3 diff -u src/lib/libpthread/pthread_join.3:1.5 src/lib/libpthread/pthread_join.3:1.6 --- src/lib/libpthread/pthread_join.3:1.5 Fri Jul 9 08:51:28 2010 +++ src/lib/libpthread/pthread_join.3 Fri Jul 9 10:55:11 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: pthread_join.3,v 1.5 2010/07/09 08:51:28 jruoho Exp $ +.\" $NetBSD: pthread_join.3,v 1.6 2010/07/09 10:55:11 wiz Exp $ .\" .\" Copyright (c) 2002 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -78,7 +78,8 @@ .Pp On return from a successful .Fn pthread_join -call with a non-NULL +call with a +.Pf non- Dv NULL .Fa value_ptr argument, the value passed to .Fn pthread_exit Index: src/lib/libpthread/pthread_key_create.3 diff -u src/lib/libpthread/pthread_key_create.3:1.5 src/lib/libpthread/pthread_key_create.3:1.6 --- src/lib/libpthread/pthread_key_create.3:1.5 Fri Jul 9 08:22:04 2010 +++ src/lib/libpthread/pthread_key_create.3 Fri Jul 9 10:55:11 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: pthread_key_create.3,v 1.5 2010/07/09 08:22:04 jruoho Exp $ +.\" $NetBSD: pthread_key_create.3,v 1.6 2010/07/09 10:55:11 wiz Exp $ .\" .\" Copyright (c) 2002, 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -90,19 +90,27 @@ defined keys in the new thread. .Pp An optional destructor function may be associated with each key value. -At thread exit, if a key value has a non-NULL destructor pointer, and the -thread has a non-NULL value associated with the key, the function pointed +At thread exit, if a key value has a +.Pf non- Dv NULL +destructor pointer, and the thread has a +.Pf non- Dv NULL +value associated with the key, the function pointed to is called with the current associated value as its sole argument. The order of destructor calls is unspecified if more than one destructor exists for a thread when it exits. .Pp -If, after all the destructors have been called for all non-NULL values -with associated destructors, there are still some non-NULL values with -associated destructors, then the process is repeated. +If, after all the destructors have been called for all +.Pf non- Dv NULL +values with associated destructors, there are still some +.Pf non- Dv NULL +values with associated destructors, then the process is repeated. If, after at least .Dv PTHREAD_DESTRUCTOR_ITERATIONS -iterations of destructor calls for -outstanding non-NULL values, there are still some non-NULL values with +iterations of destructor calls for outstanding +.Pf non- Dv NULL +values, there are still some +.Pf non- Dv NULL +values with associated destructors, the implementation stops calling destructors. .Pp The @@ -111,7 +119,9 @@ .Fn pthread_key_create . The thread-specific data values associated with .Fa key -need not be NULL at the time of the call. +need not be +.Dv NULL +at the time of the call. It is the responsibility of the application to free any application storage or perform any cleanup actions for data structures related to the deleted key or associated thread-specific data in any threads; Index: src/lib/libpthread/pthread_mutex.3 diff -u src/lib/libpthread/pthread_mutex.3:1.4 src/lib/libpthread/pthread_mutex.3:1.5 --- src/lib/libpthread/pthread_mutex.3:1.4 Thu Jul 8 21:34:22 2010 +++ src/lib/libpthread/pthread_mutex.3 Fri Jul 9 10:55:11 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: pthread_mutex.3,v 1.4 2010/07/08 21:34:22 wiz Exp $ +.\" $NetBSD: pthread_mutex.3,v 1.5 2010/07/09 10:55:11 wiz Exp $ .\" .\" Copyright (c) 2002, 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -84,7 +84,9 @@ .Fa attr . If .Fa attr -is NULL the default attributes are used. +is +.Dv NULL , +the default attributes are used. .Pp The macro .Dv PTHREAD_MUTEX_INITIALIZER Index: src/lib/libpthread/pthread_spin.3 diff -u src/lib/libpthread/pthread_spin.3:1.4 src/lib/libpthread/pthread_spin.3:1.5 --- src/lib/libpthread/pthread_spin.3:1.4 Fri Jul 9 08:31:35 2010 +++ src/lib/libpthread/pthread_spin.3 Fri Jul 9 10:55:11 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: pthread_spin.3,v 1.4 2010/07/09 08:31:35 wiz Exp $ +.\" $NetBSD: pthread_spin.3,v 1.5 2010/07/09 10:55:11 wiz Exp $ .\" .\" Copyright (c) 2002, 2008, 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -118,7 +118,9 @@ .It Bq Er EINVAL The .Fa lock -parameter was NULL or the +parameter was +.Dv NULL +or the .Fa pshared parameter was neither .Dv PTHREAD_PROCESS_SHARED Index: src/lib/libpthread/pthread_sigmask.3 diff -u src/lib/libpthread/pthread_sigmask.3:1.8 src/lib/libpthread/pthread_sigmask.3:1.9 --- src/lib/libpthread/pthread_sigmask.3:1.8 Fri Jul 9 08:51:28 2010 +++ src/lib/libpthread/pthread_sigmask.3 Fri Jul 9 10:55:11 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: pthread_sigmask.3,v 1.8 2010/07/09 08:51:28 jruoho Exp $ +.\" $NetBSD: pthread_sigmask.3,v 1.9 2010/07/09 10:55:11 wiz Exp $ .\" .\" Copyright (c) 2002 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -88,7 +88,9 @@ .Pp If .Fa oset -is not NULL, the previous signal mask is stored in the location pointed to by +is not +.Dv NULL , +the previous signal mask is stored in the location pointed to by .Fa oset . .Pp .Dv SIGKILL