1 .\" Copyright (c) 2015, 2016 IBM Corporation.
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .TH __PPC_SET_PPR_MED 3 2021-03-22 "GNU C Library" "Linux\
8 __ppc_set_ppr_med, __ppc_set_ppr_very_low, __ppc_set_ppr_low, __ppc_set_ppr_med_low, __ppc_set_ppr_med_high \-
9 Set the Program Priority Register
12 .RI ( libc ", " \-lc )
15 .B #include <sys/platform/ppc.h>
17 .B void __ppc_set_ppr_med(void);
18 .B void __ppc_set_ppr_very_low(void);
19 .B void __ppc_set_ppr_low(void);
20 .B void __ppc_set_ppr_med_low(void);
21 .B void __ppc_set_ppr_med_high(void);
24 These functions provide access to the
25 .I Program Priority Register
26 (PPR) on the Power architecture.
28 The PPR is a 64-bit register that controls the program's priority.
29 By adjusting the PPR value the programmer may improve system
30 throughput by causing system resources to be used more
31 efficiently, especially in contention situations.
32 The available unprivileged states are covered by the following functions:
34 .BR __ppc_set_ppr_med ()
35 sets the Program Priority Register value to
39 .BR __ppc_set_ppr_very_low ()
40 sets the Program Priority Register value to
43 .BR __ppc_set_ppr_low ()
44 sets the Program Priority Register value to
47 .BR __ppc_set_ppr_med_low ()
48 sets the Program Priority Register value to
53 may also be set during certain time intervals by problem-state (unprivileged)
54 programs, with the following function:
56 .BR __ppc_set_ppr_med_high ()
57 sets the Program Priority to
60 If the program priority is medium high when the time interval expires or if an
61 attempt is made to set the priority to medium high when it is not allowed, the
62 priority is set to medium.
65 .BR __ppc_set_ppr_med (),
66 .BR __ppc_set_ppr_low (),
68 .BR __ppc_set_ppr_med_low ()
69 are provided by glibc since version 2.18.
71 .BR __ppc_set_ppr_very_low ()
73 .BR __ppc_set_ppr_med_high ()
74 first appeared in glibc in version 2.23.
76 For an explanation of the terms used in this section, see
84 Interface Attribute Value
86 .BR __ppc_set_ppr_med (),
87 .BR __ppc_set_ppr_very_low (),
88 .BR __ppc_set_ppr_low (),
89 .BR __ppc_set_ppr_med_low (),
90 .BR __ppc_set_ppr_med_high ()
91 T} Thread safety MT-Safe
97 These functions are nonstandard GNU extensions.
100 .BR __ppc_set_ppr_very_low ()
102 .BR __ppc_set_ppr_med_high ()
104 .I <sys/platform/ppc.h>
108 Availability of these functions can be tested using
109 .BR "#ifdef _ARCH_PWR8" .
113 .I Power ISA, Book\~II - Section\ 3.1 (Program Priority Registers)