Module Name: src
Committed By: jruoho
Date: Thu Jul 8 22:19:26 UTC 2010
Modified Files:
src/lib/libpthread: Makefile pthread_attr_getschedparam.3
Removed Files:
src/lib/libpthread: pthread_attr_getschedpolicy.3
Log Message:
Group also pthread_attr_getschedparam(3) and pthread_attr_getschedpolicy(3),
as these two pages fit well together.
To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/lib/libpthread/Makefile
cvs rdiff -u -r1.1 -r1.2 src/lib/libpthread/pthread_attr_getschedparam.3
cvs rdiff -u -r1.1 -r0 src/lib/libpthread/pthread_attr_getschedpolicy.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/Makefile
diff -u src/lib/libpthread/Makefile:1.66 src/lib/libpthread/Makefile:1.67
--- src/lib/libpthread/Makefile:1.66 Thu Jul 8 19:20:16 2010
+++ src/lib/libpthread/Makefile Thu Jul 8 22:19:26 2010
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.66 2010/07/08 19:20:16 rmind Exp $
+# $NetBSD: Makefile,v 1.67 2010/07/08 22:19:26 jruoho Exp $
#
WARNS= 4
@@ -95,7 +95,6 @@
pthread_attr_getinheritsched.3 \
pthread_attr_getname_np.3 \
pthread_attr_getschedparam.3 \
- pthread_attr_getschedpolicy.3 \
pthread_attr_getscope.3 \
pthread_attr_getstack.3 \
pthread_attr_setcreatesuspend_np.3 \
@@ -124,9 +123,13 @@
MLINKS+= pthread_attr_getdetachstate.3 pthread_attr_setdetachstate.3
MLINKS+= pthread_attr_getguardsize.3 pthread_attr_setguardsize.3
MLINKS+= pthread_attr_getinheritsched.3 pthread_attr_setinheritsched.3
-MLINKS+= pthread_attr_getschedparam.3 pthread_attr_setschedparam.3
-MLINKS+= pthread_attr_getschedpolicy.3 pthread_attr_setschedpolicy.3
+
+MLINKS+= pthread_attr_getschedparam.3 pthread_attr_setschedparam.3 \
+ pthread_attr_getschedparam.3 pthread_attr_getschedpolicy.3 \
+ pthread_attr_getschedparam.3 pthread_attr_setschedpolicy.3
+
MLINKS+= pthread_attr_getscope.3 pthread_attr_setscope.3
+
MLINKS+= pthread_attr_getstack.3 pthread_attr_setstack.3 \
pthread_attr_getstack.3 pthread_attr_getstacksize.3 \
pthread_attr_getstack.3 pthread_attr_setstacksize.3 \
Index: src/lib/libpthread/pthread_attr_getschedparam.3
diff -u src/lib/libpthread/pthread_attr_getschedparam.3:1.1 src/lib/libpthread/pthread_attr_getschedparam.3:1.2
--- src/lib/libpthread/pthread_attr_getschedparam.3:1.1 Wed Jul 7 16:04:19 2010
+++ src/lib/libpthread/pthread_attr_getschedparam.3 Thu Jul 8 22:19:26 2010
@@ -1,4 +1,4 @@
-.\" $NetBSD: pthread_attr_getschedparam.3,v 1.1 2010/07/07 16:04:19 jruoho Exp $
+.\" $NetBSD: pthread_attr_getschedparam.3,v 1.2 2010/07/08 22:19:26 jruoho Exp $
.\"
.\" Copyright (c) 2010 Jukka Ruohonen <[email protected]>
.\" All rights reserved.
@@ -30,7 +30,7 @@
.Os
.Sh NAME
.Nm pthread_attr_getschedparam
-.Nd get and set scheduling parameter attribute
+.Nd get and set scheduling attributes
.Sh LIBRARY
.Lb libpthread
.Sh SYNOPSIS
@@ -41,6 +41,11 @@
.Ft int
.Fn pthread_attr_setschedparam \
"pthread_attr_t *attr" "const struct sched_param *param"
+.Ft int
+.Fn pthread_attr_getschedpolicy \
+"const pthread_attr_t * restrict attr" "int * restrict policy"
+.Ft int
+.Fn pthread_attr_setschedpolicy "pthread_attr_t *attr" "int policy"
.Sh DESCRIPTION
The
.Fn pthread_attr_getschedparam
@@ -60,11 +65,27 @@
and
.Xr sched 3
for additional details.
+.Pp
+The
+.Fn pthread_attr_getschedpolicy
+and
+.Fn pthread_attr_setschedpolicy
+functions get and set the scheduling policy attribute,
+.Fa policy ,
+in the
+.Fa attr
+object.
+The supported values of
+.Fa policy
+are the same ones listed in
+.Xr pthread_schedparam 3 .
.Sh RETURN VALUES
-If successful, both functions return 0.
+If successful, all described functions return 0.
Otherwise, an error number is returned to indicate the error.
.Sh ERRORS
-Both functions may fail if:
+The
+.Fn pthread_attr_getschedparam
+function may fail if:
.Bl -tag -width Er
.It Bq Er EINVAL
An invalid parameter was specified.
@@ -72,15 +93,32 @@
.Pp
The
.Fn pthread_attr_setschedparam
-function may also fail if:
+function may fail if:
.Bl -tag -width Er
+.It Bq Er EINVAL
+An invalid parameter was specified.
.It Bq Er ENOMEM
There was insufficient memory.
.El
+.Pp
+The
+.Fn pthread_attr_setschedpolicy
+function may fail if:
+.Bl -tag -width Er
+.It Bq Er ENOMEM
+There was insufficient memory.
+.It Bq Er ENOTSUP
+An unsupported
+.Fa policy
+was specified.
+.El
+.Pp
+No errors are defined for
+.Fn pthread_attr_getschedpolicy .
.Sh SEE ALSO
.Xr pthread_attr 3 ,
.Xr pthread_schedparam 3 ,
.Xr sched 3
.Sh STANDARDS
-Both functions conform to
+These functions conform to
.St -p1003.1-2008 .