Module Name:    src
Committed By:   jruoho
Date:           Wed Jul  7 16:04:19 UTC 2010

Modified Files:
        src/lib/libpthread: Makefile pthread_attr.3
Added Files:
        src/lib/libpthread: pthread_attr_getschedparam.3

Log Message:
Split pthread_attr_getschedparam() and pthread_attr_setschedparam() to a
separate page.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/lib/libpthread/Makefile
cvs rdiff -u -r1.16 -r1.17 src/lib/libpthread/pthread_attr.3
cvs rdiff -u -r0 -r1.1 src/lib/libpthread/pthread_attr_getschedparam.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.63 src/lib/libpthread/Makefile:1.64
--- src/lib/libpthread/Makefile:1.63	Wed Jul  7 15:30:32 2010
+++ src/lib/libpthread/Makefile	Wed Jul  7 16:04:19 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.63 2010/07/07 15:30:32 jruoho Exp $
+#	$NetBSD: Makefile,v 1.64 2010/07/07 16:04:19 jruoho Exp $
 #
 
 WARNS=	4
@@ -94,6 +94,7 @@
 	pthread_attr_getguardsize.3 \
 	pthread_attr_getinheritsched.3 \
 	pthread_attr_getname_np.3 \
+	pthread_attr_getschedparam.3 \
 	pthread_attr_getscope.3 \
 	pthread_attr_getstack.3 \
 	pthread_attr_setcreatesuspend_np.3 \
@@ -124,14 +125,13 @@
 
 MLINKS+=	pthread_attr.3 pthread_attr_init.3
 MLINKS+=	pthread_attr.3 pthread_attr_destroy.3
-MLINKS+=	pthread_attr.3 pthread_attr_setschedparam.3
-MLINKS+=	pthread_attr.3 pthread_attr_getschedparam.3
 MLINKS+=	pthread_attr.3 pthread_attr_setschedpolicy.3
 MLINKS+=	pthread_attr.3 pthread_attr_getschedpolicy.3
 
 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_getscope.3 pthread_attr_setscope.3
 MLINKS+=	pthread_attr_getstack.3 pthread_attr_setstack.3 \
 		pthread_attr_getstack.3 pthread_attr_getstacksize.3 \

Index: src/lib/libpthread/pthread_attr.3
diff -u src/lib/libpthread/pthread_attr.3:1.16 src/lib/libpthread/pthread_attr.3:1.17
--- src/lib/libpthread/pthread_attr.3:1.16	Wed Jul  7 15:30:32 2010
+++ src/lib/libpthread/pthread_attr.3	Wed Jul  7 16:04:19 2010
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pthread_attr.3,v 1.16 2010/07/07 15:30:32 jruoho Exp $
+.\"	$NetBSD: pthread_attr.3,v 1.17 2010/07/07 16:04:19 jruoho Exp $
 .\"
 .\" Copyright (c) 2002 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -59,8 +59,6 @@
 .Sh NAME
 .Nm pthread_attr_init ,
 .Nm pthread_attr_destroy ,
-.Nm pthread_attr_setschedparam ,
-.Nm pthread_attr_getschedparam
 .Nm pthread_attr_setschedpolicy ,
 .Nm pthread_attr_getschedpolicy
 .Nd thread attribute operations
@@ -73,10 +71,6 @@
 .Ft int
 .Fn pthread_attr_destroy "pthread_attr_t *attr"
 .Ft int
-.Fn pthread_attr_setschedparam "pthread_attr_t * restrict attr" "const struct sched_param * restrict param"
-.Ft int
-.Fn pthread_attr_getschedparam "const pthread_attr_t * restrict attr" "struct sched_param * restrict param"
-.Ft int
 .Fn pthread_attr_setschedpolicy "pthread_attr_t *attr" "int policy"
 .Ft int
 .Fn pthread_attr_getschedpolicy "const pthread_attr_t * restrict attr" "int * restrict policy"
@@ -126,19 +120,6 @@
 is invalid.
 .El
 .Pp
-.Fn pthread_attr_setschedparam
-may fail if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-The value specified by
-.Fa attr
-is invalid.
-.It Bq Er ENOTSUP
-The value specified by
-.Fa param
-is invalid.
-.El
-.Pp
 .Fn pthread_attr_setschedpolicy
 may fail if:
 .Bl -tag -width Er
@@ -155,10 +136,6 @@
 .Sh STANDARDS
 .Fn pthread_attr_init ,
 .Fn pthread_attr_destroy ,
-.Fn pthread_attr_setschedparam ,
-.Fn pthread_attr_setschedparam ,
-and
-.Fn pthread_attr_getschedparam
 .Fn pthread_attr_setschedpolicy ,
 and
 .Fn pthread_attr_getschedpolicy

Added files:

Index: src/lib/libpthread/pthread_attr_getschedparam.3
diff -u /dev/null src/lib/libpthread/pthread_attr_getschedparam.3:1.1
--- /dev/null	Wed Jul  7 16:04:19 2010
+++ src/lib/libpthread/pthread_attr_getschedparam.3	Wed Jul  7 16:04:19 2010
@@ -0,0 +1,86 @@
+.\"	$NetBSD: pthread_attr_getschedparam.3,v 1.1 2010/07/07 16:04:19 jruoho Exp $
+.\"
+.\" Copyright (c) 2010 Jukka Ruohonen <jruoho...@iki.fi>
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd July 7, 2010
+.Dt PTHREAD_ATTR_GETSCHEDPARAM 3
+.Os
+.Sh NAME
+.Nm pthread_attr_getschedparam
+.Nd get and set scheduling parameter attribute
+.Sh LIBRARY
+.Lb libpthread
+.Sh SYNOPSIS
+.In pthread.h
+.Ft int
+.Fn pthread_attr_getschedparam \
+"const pthread_attr_t * restrict attr" "struct sched_param * restrict param"
+.Ft int
+.Fn pthread_attr_setschedparam \
+"pthread_attr_t *attr" "const struct sched_param *param"
+.Sh DESCRIPTION
+The
+.Fn pthread_attr_getschedparam
+and
+.Fn pthread_attr_setschedparam
+functions obtain and set the scheduling parameter attribute in the
+.Fa attr
+object.
+The
+.Vt sched_param
+structure is defined in
+.In sched.h .
+At minimum this structure contains only a single member,
+.Vt sched_priority .
+Refer to
+.Xr pthread_schedparam 3
+and
+.Xr sched 3
+for additional details.
+.Sh RETURN VALUES
+If successful, both functions return 0.
+Otherwise, an error number is returned to indicate the error.
+.Sh ERRORS
+Both functions may fail if:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+An invalid parameter was specified.
+.El
+.Pp
+The
+.Fn pthread_attr_setschedparam
+function may also fail if:
+.Bl -tag -width Er
+.It Bq Er ENOMEM
+There was insufficient memory.
+.El
+.Sh SEE ALSO
+.Xr pthread_attr 3 ,
+.Xr pthread_schedparam 3 ,
+.Xr sched 3
+.Sh STANDARDS
+Both functions conform to
+.St -p1003.1-2008 .

Reply via email to