1 .\" Copyright (c) 2015, 2016 IBM Corporation.
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.
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.
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.
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
25 .TH __PPC_SET_PPR_MED 3 2021-03-22 "GNU C Library" "Linux\
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
32 .B #include <sys/platform/ppc.h>
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);
41 These functions provide access to the
42 .I Program Priority Register
43 (PPR) on the Power architecture.
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:
51 .BR __ppc_set_ppr_med ()
52 sets the Program Priority Register value to
56 .BR __ppc_set_ppr_very_low ()
57 sets the Program Priority Register value to
60 .BR __ppc_set_ppr_low ()
61 sets the Program Priority Register value to
64 .BR __ppc_set_ppr_med_low ()
65 sets the Program Priority Register value to
70 may also be set during certain time intervals by problem-state (unprivileged)
71 programs, with the following function:
73 .BR __ppc_set_ppr_med_high ()
74 sets the Program Priority to
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.
82 .BR __ppc_set_ppr_med (),
83 .BR __ppc_set_ppr_low (),
85 .BR __ppc_set_ppr_med_low ()
86 are provided by glibc since version 2.18.
88 .BR __ppc_set_ppr_very_low ()
90 .BR __ppc_set_ppr_med_high ()
91 first appeared in glibc in version 2.23.
93 For an explanation of the terms used in this section, see
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
114 These functions are nonstandard GNU extensions.
117 .BR __ppc_set_ppr_very_low ()
119 .BR __ppc_set_ppr_med_high ()
121 .I <sys/platform/ppc.h>
125 Availability of these functions can be tested using
126 .BR "#ifdef _ARCH_PWR8" .
130 .IR "Power ISA, Book\ II - Section\ 3.1 (Program Priority Registers)"