]>
Commit | Line | Data |
---|---|---|
831f5b9a | 1 | .\" Copyright (c) 2015, 2016 IBM Corporation. |
fff0e08c GG |
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 | .\" | |
4b8c67d9 | 25 | .TH __PPC_SET_PPR_MED 3 2017-09-15 "GNU C Library" "Linux\ |
fff0e08c GG |
26 | Programmer's Manual" |
27 | .SH NAME | |
eb6b6909 | 28 | __ppc_set_ppr_med, __ppc_set_ppr_very_low, __ppc_set_ppr_low, __ppc_set_ppr_med_low, __ppc_set_ppr_med_high \- |
fff0e08c GG |
29 | Set the Program Priority Register |
30 | .SH SYNOPSIS | |
31 | .B #include <sys/platform/ppc.h> | |
68e4db0a | 32 | .PP |
fff0e08c GG |
33 | .B void __ppc_set_ppr_med(void); |
34 | .br | |
eb6b6909 GG |
35 | .B void __ppc_set_ppr_very_low(void); |
36 | .br | |
fff0e08c GG |
37 | .B void __ppc_set_ppr_low(void); |
38 | .br | |
39 | .B void __ppc_set_ppr_med_low(void); | |
eb6b6909 GG |
40 | .br |
41 | .B void __ppc_set_ppr_med_high(void); | |
fff0e08c | 42 | .SH DESCRIPTION |
d83d1e1c | 43 | These functions provide access to the |
fff0e08c | 44 | .I Program Priority Register |
d83d1e1c | 45 | (PPR) on the Power architecture. |
11ac5b51 | 46 | .PP |
fff0e08c GG |
47 | The PPR is a 64-bit register that controls the program's priority. |
48 | By adjusting the PPR value the programmer may improve system | |
d83d1e1c | 49 | throughput by causing system resources to be used more |
fff0e08c | 50 | efficiently, especially in contention situations. |
42f014d3 | 51 | The available unprivileged states are covered by the following functions: |
d83d1e1c | 52 | .IP * 3 |
fff0e08c | 53 | .BR __ppc_set_ppr_med () |
d83d1e1c MK |
54 | sets the Program Priority Register value to |
55 | .IR medium | |
56 | (default). | |
57 | .IP * | |
eb6b6909 GG |
58 | .BR __ppc_set_ppr_very_low () |
59 | sets the Program Priority Register value to | |
60 | .IR "very low" . | |
61 | .IP * | |
fff0e08c | 62 | .BR __ppc_set_ppr_low () |
d83d1e1c MK |
63 | sets the Program Priority Register value to |
64 | .IR low . | |
65 | .IP * | |
fff0e08c | 66 | .BR __ppc_set_ppr_med_low () |
d83d1e1c MK |
67 | sets the Program Priority Register value to |
68 | .IR "medium low" . | |
11ac5b51 | 69 | .PP |
eb6b6909 GG |
70 | The privileged state |
71 | .IR "medium high" | |
72 | may also be set during certain time intervals by problem-state (unprivileged) | |
73 | programs, with the following function: | |
74 | .IP * 3 | |
75 | .BR __ppc_set_ppr_med_high () | |
76 | sets the Program Priority to | |
77 | .IR "medium high" . | |
11ac5b51 | 78 | .PP |
eb6b6909 GG |
79 | If the program priority is medium high when the time interval expires or if an |
80 | attempt is made to set the priority to medium high when it is not allowed, the | |
81 | priority is set to medium. | |
fff0e08c | 82 | .SH VERSIONS |
eb6b6909 GG |
83 | The functions |
84 | .BR __ppc_set_ppr_med (), | |
85 | .BR __ppc_set_ppr_low () | |
86 | and | |
87 | .BR __ppc_set_ppr_med_low () | |
88 | are provided by glibc since version 2.18. | |
89 | The functions | |
90 | .BR __ppc_set_ppr_very_low () | |
91 | and | |
92 | .BR __ppc_set_ppr_med_high () | |
93 | first appeared in glibc in version 2.23. | |
fff0e08c GG |
94 | .SH ATTRIBUTES |
95 | For an explanation of the terms used in this section, see | |
96 | .BR attributes (7). | |
97 | .ad l | |
98 | .TS | |
99 | allbox; | |
e65b3f0d | 100 | lbw26 lb lb |
fff0e08c GG |
101 | l l l. |
102 | Interface Attribute Value | |
103 | T{ | |
104 | .BR __ppc_set_ppr_med (), | |
e65b3f0d | 105 | .br |
eb6b6909 | 106 | .BR __ppc_set_ppr_very_low (), |
e65b3f0d | 107 | .br |
fff0e08c | 108 | .BR __ppc_set_ppr_low (), |
e65b3f0d | 109 | .br |
eb6b6909 | 110 | .BR __ppc_set_ppr_med_low (), |
e65b3f0d | 111 | .br |
eb6b6909 | 112 | .BR __ppc_set_ppr_med_high () |
fff0e08c GG |
113 | T} Thread safety MT-Safe |
114 | .TE | |
115 | .ad | |
116 | .SH CONFORMING TO | |
117 | These functions are nonstandard GNU extensions. | |
49a93479 | 118 | .SH NOTES |
831f5b9a WSM |
119 | The functions |
120 | .BR __ppc_set_ppr_very_low () | |
121 | and | |
122 | .BR __ppc_set_ppr_med_high () | |
123 | will be defined by | |
124 | .I <sys/platform/ppc.h> | |
125 | if | |
126 | .B _ARCH_PWR8 | |
127 | is defined. | |
128 | Availability of these functions can be tested using | |
129 | .BR "#ifdef _ARCH_PWR8" . | |
fff0e08c GG |
130 | .SH SEE ALSO |
131 | .BR __ppc_yield (3) | |
847e0d88 | 132 | .PP |
d83d1e1c | 133 | .IR "Power ISA, Book\ II - Section\ 3.1 (Program Priority Registers)" |