termios.3: wfix
[man-pages.git] / man3 / __ppc_set_ppr_med.3
blob5547a6cd73c3facb193f891fee0907a6fa03feb6
1 .\" Copyright (c) 2015, 2016 IBM Corporation.
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of
9 .\" this manual under the conditions for verbatim copying, provided that
10 .\" the entire resulting derived work is distributed under the terms of
11 .\" a permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume.
15 .\" no responsibility for errors or omissions, or for damages resulting.
16 .\" from the use of the information contained herein.  The author(s) may.
17 .\" not have taken the same level of care in the production of this.
18 .\" manual, which is licensed free of charge, as they might when working.
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" %%%LICENSE_END
24 .\"
25 .TH __PPC_SET_PPR_MED 3 2021-03-22 "GNU C Library" "Linux\
26 Programmer's Manual"
27 .SH NAME
28 __ppc_set_ppr_med, __ppc_set_ppr_very_low, __ppc_set_ppr_low, __ppc_set_ppr_med_low, __ppc_set_ppr_med_high \-
29 Set the Program Priority Register
30 .SH SYNOPSIS
31 .nf
32 .B #include <sys/platform/ppc.h>
33 .PP
34 .B void __ppc_set_ppr_med(void);
35 .B void __ppc_set_ppr_very_low(void);
36 .B void __ppc_set_ppr_low(void);
37 .B void __ppc_set_ppr_med_low(void);
38 .B void __ppc_set_ppr_med_high(void);
39 .fi
40 .SH DESCRIPTION
41 These functions provide access to the
42 .I Program Priority Register
43 (PPR) on the Power architecture.
44 .PP
45 The PPR is a 64-bit register that controls the program's priority.
46 By adjusting the PPR value the programmer may improve system
47 throughput by causing system resources to be used more
48 efficiently, especially in contention situations.
49 The available unprivileged states are covered by the following functions:
50 .IP * 3
51 .BR __ppc_set_ppr_med ()
52 sets the Program Priority Register value to
53 .IR medium
54 (default).
55 .IP *
56 .BR __ppc_set_ppr_very_low ()
57 sets the Program Priority Register value to
58 .IR "very low" .
59 .IP *
60 .BR __ppc_set_ppr_low ()
61 sets the Program Priority Register value to
62 .IR low .
63 .IP *
64 .BR __ppc_set_ppr_med_low ()
65 sets the Program Priority Register value to
66 .IR "medium low" .
67 .PP
68 The privileged state
69 .IR "medium high"
70 may also be set during certain time intervals by problem-state (unprivileged)
71 programs, with the following function:
72 .IP * 3
73 .BR __ppc_set_ppr_med_high ()
74 sets the Program Priority to
75 .IR "medium high" .
76 .PP
77 If the program priority is medium high when the time interval expires or if an
78 attempt is made to set the priority to medium high when it is not allowed, the
79 priority is set to medium.
80 .SH VERSIONS
81 The functions
82 .BR __ppc_set_ppr_med (),
83 .BR __ppc_set_ppr_low (),
84 and
85 .BR __ppc_set_ppr_med_low ()
86 are provided by glibc since version 2.18.
87 The functions
88 .BR __ppc_set_ppr_very_low ()
89 and
90 .BR __ppc_set_ppr_med_high ()
91 first appeared in glibc in version 2.23.
92 .SH ATTRIBUTES
93 For an explanation of the terms used in this section, see
94 .BR attributes (7).
95 .ad l
96 .nh
97 .TS
98 allbox;
99 lbx lb lb
100 l l l.
101 Interface       Attribute       Value
103 .BR __ppc_set_ppr_med (),
104 .BR __ppc_set_ppr_very_low (),
105 .BR __ppc_set_ppr_low (),
106 .BR __ppc_set_ppr_med_low (),
107 .BR __ppc_set_ppr_med_high ()
108 T}      Thread safety   MT-Safe
112 .sp 1
113 .SH CONFORMING TO
114 These functions are nonstandard GNU extensions.
115 .SH NOTES
116 The functions
117 .BR __ppc_set_ppr_very_low ()
119 .BR __ppc_set_ppr_med_high ()
120 will be defined by
121 .I <sys/platform/ppc.h>
123 .B _ARCH_PWR8
124 is defined.
125 Availability of these functions can be tested using
126 .BR "#ifdef _ARCH_PWR8" .
127 .SH SEE ALSO
128 .BR __ppc_yield (3)
130 .IR "Power ISA, Book\ II - Section\ 3.1 (Program Priority Registers)"