]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/__ppc_set_ppr_med.3
err.3: EXAMPLES: use EXIT_FAILURE rather than 1 as exit status
[thirdparty/man-pages.git] / man3 / __ppc_set_ppr_med.3
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 2017-09-15 "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 .B #include <sys/platform/ppc.h>
32 .PP
33 .B void __ppc_set_ppr_med(void);
34 .br
35 .B void __ppc_set_ppr_very_low(void);
36 .br
37 .B void __ppc_set_ppr_low(void);
38 .br
39 .B void __ppc_set_ppr_med_low(void);
40 .br
41 .B void __ppc_set_ppr_med_high(void);
42 .SH DESCRIPTION
43 These functions provide access to the
44 .I Program Priority Register
45 (PPR) on the Power architecture.
46 .PP
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
49 throughput by causing system resources to be used more
50 efficiently, especially in contention situations.
51 The available unprivileged states are covered by the following functions:
52 .IP * 3
53 .BR __ppc_set_ppr_med ()
54 sets the Program Priority Register value to
55 .IR medium
56 (default).
57 .IP *
58 .BR __ppc_set_ppr_very_low ()
59 sets the Program Priority Register value to
60 .IR "very low" .
61 .IP *
62 .BR __ppc_set_ppr_low ()
63 sets the Program Priority Register value to
64 .IR low .
65 .IP *
66 .BR __ppc_set_ppr_med_low ()
67 sets the Program Priority Register value to
68 .IR "medium low" .
69 .PP
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" .
78 .PP
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.
82 .SH VERSIONS
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.
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;
100 lbw26 lb lb
101 l l l.
102 Interface Attribute Value
103 T{
104 .BR __ppc_set_ppr_med (),
105 .br
106 .BR __ppc_set_ppr_very_low (),
107 .br
108 .BR __ppc_set_ppr_low (),
109 .br
110 .BR __ppc_set_ppr_med_low (),
111 .br
112 .BR __ppc_set_ppr_med_high ()
113 T} Thread safety MT-Safe
114 .TE
115 .ad
116 .SH CONFORMING TO
117 These functions are nonstandard GNU extensions.
118 .SH NOTES
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" .
130 .SH SEE ALSO
131 .BR __ppc_yield (3)
132 .PP
133 .IR "Power ISA, Book\ II - Section\ 3.1 (Program Priority Registers)"