| 1 |
'\" t |
| 2 |
.\" Copyright 2015-2016, International Business Machines Corp. |
| 3 |
.\" Copyright, the authors of the Linux man-pages project |
| 4 |
.\" |
| 5 |
.\" SPDX-License-Identifier: Linux-man-pages-copyleft |
| 6 |
.\" |
| 7 |
.TH __ppc_set_ppr_med 3 2026-02-08 "Linux man-pages 6.18" |
| 8 |
Programmer's Manual" |
| 9 |
.SH NAME |
| 10 |
__ppc_set_ppr_med, __ppc_set_ppr_very_low, __ppc_set_ppr_low, |
| 11 |
__ppc_set_ppr_med_low, __ppc_set_ppr_med_high \- |
| 12 |
Set the Program Priority Register |
| 13 |
.SH LIBRARY |
| 14 |
Standard C library |
| 15 |
.RI ( libc ,\~ \-lc ) |
| 16 |
.SH SYNOPSIS |
| 17 |
.nf |
| 18 |
.B #include <sys/platform/ppc.h> |
| 19 |
.P |
| 20 |
.B void __ppc_set_ppr_med(void); |
| 21 |
.B void __ppc_set_ppr_very_low(void); |
| 22 |
.B void __ppc_set_ppr_low(void); |
| 23 |
.B void __ppc_set_ppr_med_low(void); |
| 24 |
.B void __ppc_set_ppr_med_high(void); |
| 25 |
.fi |
| 26 |
.SH DESCRIPTION |
| 27 |
These functions provide access to the |
| 28 |
.I Program Priority Register |
| 29 |
(PPR) on the Power architecture. |
| 30 |
.P |
| 31 |
The PPR is a 64-bit register that controls the program's priority. |
| 32 |
By adjusting the PPR value the programmer may improve system |
| 33 |
throughput by causing system resources to be used more |
| 34 |
efficiently, especially in contention situations. |
| 35 |
The available unprivileged states are covered by the following functions: |
| 36 |
.TP |
| 37 |
.BR __ppc_set_ppr_med () |
| 38 |
sets the Program Priority Register value to |
| 39 |
.I medium |
| 40 |
(default). |
| 41 |
.TP |
| 42 |
.BR __ppc_set_ppr_very_low () |
| 43 |
sets the Program Priority Register value to |
| 44 |
.IR "very low" . |
| 45 |
.TP |
| 46 |
.BR __ppc_set_ppr_low () |
| 47 |
sets the Program Priority Register value to |
| 48 |
.IR low . |
| 49 |
.TP |
| 50 |
.BR __ppc_set_ppr_med_low () |
| 51 |
sets the Program Priority Register value to |
| 52 |
.IR "medium low" . |
| 53 |
.P |
| 54 |
The privileged state |
| 55 |
.I medium high |
| 56 |
may also be set during certain time intervals by problem-state (unprivileged) |
| 57 |
programs, with the following function: |
| 58 |
.TP |
| 59 |
.BR __ppc_set_ppr_med_high () |
| 60 |
sets the Program Priority to |
| 61 |
.IR "medium high" . |
| 62 |
.P |
| 63 |
If the program priority is medium high when the time interval expires or if an |
| 64 |
attempt is made to set the priority to medium high when it is not allowed, the |
| 65 |
priority is set to medium. |
| 66 |
.SH ATTRIBUTES |
| 67 |
For an explanation of the terms used in this section, see |
| 68 |
.BR attributes (7). |
| 69 |
.TS |
| 70 |
allbox; |
| 71 |
lbx lb lb |
| 72 |
l l l. |
| 73 |
Interface Attribute Value |
| 74 |
T{ |
| 75 |
.na |
| 76 |
.nh |
| 77 |
.BR __ppc_set_ppr_med (), |
| 78 |
.BR __ppc_set_ppr_very_low (), |
| 79 |
.BR __ppc_set_ppr_low (), |
| 80 |
.BR __ppc_set_ppr_med_low (), |
| 81 |
.BR __ppc_set_ppr_med_high () |
| 82 |
T} Thread safety MT-Safe |
| 83 |
.TE |
| 84 |
.SH STANDARDS |
| 85 |
GNU. |
| 86 |
.SH HISTORY |
| 87 |
.TP |
| 88 |
.BR __ppc_set_ppr_med () |
| 89 |
.TQ |
| 90 |
.BR __ppc_set_ppr_low () |
| 91 |
.TQ |
| 92 |
.BR __ppc_set_ppr_med_low () |
| 93 |
glibc 2.18. |
| 94 |
.TP |
| 95 |
.BR __ppc_set_ppr_very_low () |
| 96 |
.TQ |
| 97 |
.BR __ppc_set_ppr_med_high () |
| 98 |
glibc 2.23. |
| 99 |
.SH NOTES |
| 100 |
The functions |
| 101 |
.BR __ppc_set_ppr_very_low () |
| 102 |
and |
| 103 |
.BR __ppc_set_ppr_med_high () |
| 104 |
will be defined by |
| 105 |
.I <sys/platform/ppc.h> |
| 106 |
if |
| 107 |
.B _ARCH_PWR8 |
| 108 |
is defined. |
| 109 |
Availability of these functions can be tested using |
| 110 |
.BR "#ifdef _ARCH_PWR8" . |
| 111 |
.SH SEE ALSO |
| 112 |
.BR __ppc_yield (3) |
| 113 |
.P |
| 114 |
.I Power ISA, Book\~II - Section\ 3.1 (Program Priority Registers) |