Skip to content

Commit

Permalink
man page for sched_protect (Charles Cui, GSoC 2016)
Browse files Browse the repository at this point in the history
  • Loading branch information
zoulasc committed Jul 5, 2016
1 parent 1b1484f commit 2031289
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
5 changes: 4 additions & 1 deletion distrib/sets/lists/comp/mi
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion lib/librt/Makefile
Original file line number Diff line number Diff line change
@@ -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>
Expand Down Expand Up @@ -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
Expand Down
14 changes: 11 additions & 3 deletions lib/librt/sched.3
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -152,6 +155,10 @@ Get the affinity mask of the process specified by
.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
Expand All @@ -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 ,
Expand Down

0 comments on commit 2031289

Please sign in to comment.