Source-Changes-HG archive

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

[src/trunk]: src/lib/libpthread Remove error conditions. Add CAVEATS to note ...



details:   https://anonhg.NetBSD.org/src/rev/725f783ac1df
branches:  trunk
changeset: 756254:725f783ac1df
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Fri Jul 09 16:54:30 2010 +0000

description:
Remove error conditions. Add CAVEATS to note the questionable value of the
functions in NetBSD, which does not support additional condition attributes.
Note that these do not conform to SUSv4, where two additional attributes are
mandated.

diffstat:

 lib/libpthread/pthread_condattr.3 |  39 ++++++++++++++++-----------------------
 1 files changed, 16 insertions(+), 23 deletions(-)

diffs (70 lines):

diff -r 34e465c1e187 -r 725f783ac1df lib/libpthread/pthread_condattr.3
--- a/lib/libpthread/pthread_condattr.3 Fri Jul 09 16:54:05 2010 +0000
+++ b/lib/libpthread/pthread_condattr.3 Fri Jul 09 16:54:30 2010 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: pthread_condattr.3,v 1.5 2010/07/09 08:51:28 jruoho Exp $
+.\" $NetBSD: pthread_condattr.3,v 1.6 2010/07/09 16:54:30 jruoho Exp $
 .\"
 .\" Copyright (c) 2002 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -54,8 +54,7 @@
 .Dt PTHREAD_CONDATTR 3
 .Os
 .Sh NAME
-.Nm pthread_condattr_init ,
-.Nm pthread_condattr_destroy
+.Nm pthread_condattr_init
 .Nd condition attribute operations
 .Sh LIBRARY
 .Lb libpthread
@@ -66,36 +65,30 @@
 .Ft int
 .Fn pthread_condattr_destroy "pthread_condattr_t *attr"
 .Sh DESCRIPTION
-Condition attribute objects are used to specify parameters to
-.Fn pthread_cond_init .
+Condition attribute objects are used to specify parameters to the
+.Xr pthread_cond_init 3
+function.
 The
 .Fn pthread_condattr_init
-function initializes a condition attribute object with the default attributes.
-.Pp
-The
+function initializes a condition attribute object with the default attributes
+and the
 .Fn pthread_condattr_destroy
 function destroys a condition attribute object.
 .Sh RETURN VALUES
 If successful, these functions return 0.
 Otherwise, an error number is returned to indicate the error.
 .Sh ERRORS
-.Fn pthread_condattr_init
-shall fail if:
-.Bl -tag -width Er
-.It Bq Er ENOMEM
-Insufficient memory exists to initialize the condition attribute object.
-.El
-.Pp
-.Fn pthread_condattr_destroy
-may fail if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-The value specified by
-.Fa attr
-is invalid.
-.El
+No errors are defined for either function.
 .Sh SEE ALSO
 .Xr pthread_cond_init 3
 .Sh STANDARDS
 Both functions conform to
 .St -p1003.1-2001 .
+.Sh CAVEATS
+The usefulness of the functions is questionable as the
+.Nx
+implementation does not support any non-default attributes.
+These functions do not conform to the
+.St -p1003.1-2008
+revision of the standard, which mandates two additional attributes,
+the clock attribute and the process-shared attribute.



Home | Main Index | Thread Index | Old Index