Module Name: src
Committed By: christos
Date: Tue Jul 5 21:13:12 UTC 2016
Modified Files:
src/distrib/sets/lists/comp: mi
src/lib/librt: Makefile sched.3
Log Message:
man page for sched_protect (Charles Cui, GSoC 2016)
To generate a diff of this commit:
cvs rdiff -u -r1.2049 -r1.2050 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.18 -r1.19 src/lib/librt/Makefile
cvs rdiff -u -r1.12 -r1.13 src/lib/librt/sched.3
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.2049 src/distrib/sets/lists/comp/mi:1.2050
--- src/distrib/sets/lists/comp/mi:1.2049 Sun Jul 3 22:05:56 2016
+++ src/distrib/sets/lists/comp/mi Tue Jul 5 17:13:12 2016
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.2049 2016/07/04 02:05:56 christos Exp $
+# $NetBSD: mi,v 1.2050 2016/07/05 21:13:12 christos Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
./etc/mtree/set.comp comp-sys-root
@@ -8683,6 +8683,7 @@
./usr/share/man/cat3/sched_get_priority_min.0 comp-c-catman .cat
./usr/share/man/cat3/sched_getparam.0 comp-c-catman .cat
./usr/share/man/cat3/sched_getscheduler.0 comp-c-catman .cat
+./usr/share/man/cat3/sched_protect.0 comp-c-catman .cat
./usr/share/man/cat3/sched_rr_get_interval.0 comp-c-catman .cat
./usr/share/man/cat3/sched_setparam.0 comp-c-catman .cat
./usr/share/man/cat3/sched_setscheduler.0 comp-c-catman .cat
@@ -15912,6 +15913,7 @@
./usr/share/man/html3/sched_get_priority_min.html comp-c-htmlman html
./usr/share/man/html3/sched_getparam.html comp-c-htmlman html
./usr/share/man/html3/sched_getscheduler.html comp-c-htmlman html
+./usr/share/man/html3/sched_protect.html comp-c-htmlman html
./usr/share/man/html3/sched_rr_get_interval.html comp-c-htmlman html
./usr/share/man/html3/sched_setparam.html comp-c-htmlman html
./usr/share/man/html3/sched_setscheduler.html comp-c-htmlman html
@@ -23142,6 +23144,7 @@
./usr/share/man/man3/sched_get_priority_min.3 comp-c-man .man
./usr/share/man/man3/sched_getparam.3 comp-c-man .man
./usr/share/man/man3/sched_getscheduler.3 comp-c-man .man
+./usr/share/man/man3/sched_protect.3 comp-c-man .man
./usr/share/man/man3/sched_rr_get_interval.3 comp-c-man .man
./usr/share/man/man3/sched_setparam.3 comp-c-man .man
./usr/share/man/man3/sched_setscheduler.3 comp-c-man .man
Index: src/lib/librt/Makefile
diff -u src/lib/librt/Makefile:1.18 src/lib/librt/Makefile:1.19
--- src/lib/librt/Makefile:1.18 Thu Dec 19 14:40:08 2013
+++ src/lib/librt/Makefile Tue Jul 5 17:13:12 2016
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.18 2013/12/19 19:40:08 rmind Exp $
+# $NetBSD: Makefile,v 1.19 2016/07/05 21:13:12 christos Exp $
#
.include <bsd.own.mk>
@@ -33,6 +33,7 @@ MLINKS+= pset.3 pset_destroy.3
MLINKS+= sched.3 sched_setparam.3
MLINKS+= sched.3 sched_getparam.3
+MLINKS+= sched.3 sched_protect.3
MLINKS+= sched.3 sched_setscheduler.3
MLINKS+= sched.3 sched_getscheduler.3
MLINKS+= sched.3 sched_get_priority_max.3
Index: src/lib/librt/sched.3
diff -u src/lib/librt/sched.3:1.12 src/lib/librt/sched.3:1.13
--- src/lib/librt/sched.3:1.12 Sat Feb 20 11:00:10 2016
+++ src/lib/librt/sched.3 Tue Jul 5 17:13:12 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: sched.3,v 1.12 2016/02/20 16:00:10 riastradh Exp $
+.\" $NetBSD: sched.3,v 1.13 2016/07/05 21:13:12 christos Exp $
.\"
.\" Copyright (c) 2008 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd December 4, 2011
+.Dd July 5, 2016
.Dt SCHED 3
.Os
.Sh NAME
@@ -38,7 +38,8 @@
.Nm sched_get_priority_max ,
.Nm sched_get_priority_min ,
.Nm sched_rr_get_interval ,
-.Nm sched_yield
+.Nm sched_yield ,
+.Nm sched_protect
.Nd process scheduling
.Sh LIBRARY
.Lb librt
@@ -60,6 +61,8 @@
.Fn sched_rr_get_interval "pid_t pid" "struct timespec *interval"
.Ft int
.Fn sched_yield "void"
+.Ft int
+.Fn sched_protect "int priority"
.Sh DESCRIPTION
This section describes the functions used to get scheduling information
about processes, and control the scheduling of processes.
@@ -152,6 +155,10 @@ Get the affinity mask of the process spe
.Fa pid
into the
.Fa cpuset .
+.It Fn sched_protect priority
+Performs priority protection for PTHREAD_PRIO_PROTECT protocol.
+This function will increase the priority of the caller thread to
+.Fa priority.
.El
.Sh IMPLEMENTATION NOTES
Setting CPU
@@ -170,6 +177,7 @@ and
.Fn sched_getaffinity_np
functions.
.Sh RETURN VALUES
+.Fn sched_protect ,
.Fn sched_setparam ,
.Fn sched_getparam ,
.Fn sched_rr_get_interval ,