PowerPC: Fix gettimeofday ifunc selection
[jlayton/glibc.git] / manual / platform.texi
1 @node Platform, Contributors, Maintenance, Top
2 @c %MENU% Describe all platform-specific facilities provided
3 @appendix Platform-specific facilities
4
5 @Theglibc{} can provide machine-specific functionality.
6
7 @menu
8 * PowerPC::           Facilities Specific to the PowerPC Architecture
9 @end menu
10
11 @node PowerPC
12 @appendixsec PowerPC-specific Facilities
13
14 Facilities specific to PowerPC that are not specific to a particular
15 operating system are declared in @file{sys/platform/ppc.h}.
16
17 @deftypefun {uint64_t} __ppc_get_timebase (void)
18 Read the current value of the Time Base Register.
19
20 The @dfn{Time Base Register} is a 64-bit register that stores a monotonically
21 incremented value updated at a system-dependent frequency that may be
22 different from the processor frequency.  More information is available in
23 @cite{Power ISA 2.06b - Book II - Section 5.2}.
24
25 @code{__ppc_get_timebase} uses the processor's time base facility directly
26 without requiring assistance from the operating system, so it is very
27 efficient.
28 @end deftypefun
29
30 @deftypefun {uint64_t} __ppc_get_timebase_freq (void)
31 Read the current frequency at which the Time Base Register is updated.
32
33 This frequency is not related to the processor clock or the bus clock.
34 It is also possible that this frequency is not constant.  More information is
35 available in @cite{Power ISA 2.06b - Book II - Section 5.2}.
36 @end deftypefun
37
38 The following functions provide hints about the usage of resources that are
39 shared with other processors.  They can be used, for example, if a program
40 waiting on a lock intends to divert the shared resources to be used by other
41 processors.  More information is available in @cite{Power ISA 2.06b - Book II -
42 Section 3.2}.
43
44 @deftypefun {void} __ppc_yield (void)
45 Provide a hint that performance will probably be improved if shared resources
46 dedicated to the executing processor are released for use by other processors.
47 @end deftypefun
48
49 @deftypefun {void} __ppc_mdoio (void)
50 Provide a hint that performance will probably be improved if shared resources
51 dedicated to the executing processor are released until all outstanding storage
52 accesses to caching-inhibited storage have been completed.
53 @end deftypefun
54
55 @deftypefun {void} __ppc_mdoom (void)
56 Provide a hint that performance will probably be improved if shared resources
57 dedicated to the executing processor are released until all outstanding storage
58 accesses to cacheable storage for which the data is not in the cache have been
59 completed.
60 @end deftypefun
61
62 @deftypefun {void} __ppc_set_ppr_med (void)
63 Set the Program Priority Register to medium value (default).
64
65 The @dfn{Program Priority Register} (PPR) is a 64-bit register that controls
66 the program's priority.  By adjusting the PPR value the programmer may
67 improve system throughput by causing the system resources to be used
68 more efficiently, especially in contention situations.
69 The three unprivileged states available are covered by the functions
70 @code{__ppc_set_ppr_med} (medium -- default), @code{__ppc_set_ppc_low} (low)
71 and @code{__ppc_set_ppc_med_low} (medium low).  More information
72 available in @cite{Power ISA 2.06b - Book II - Section 3.1}.
73 @end deftypefun
74
75 @deftypefun {void} __ppc_set_ppr_low (void)
76 Set the Program Priority Register to low value.
77 @end deftypefun
78
79 @deftypefun {void} __ppc_set_ppr_med_low (void)
80 Set the Program Priority Register to medium low value.
81 @end deftypefun