1 @node Platform, Contributors, Maintenance, Top
2 @c %MENU% Describe all platform-specific facilities provided
3 @appendix Platform-specific facilities
5 @Theglibc{} can provide machine-specific functionality.
8 * PowerPC:: Facilities Specific to the PowerPC Architecture
12 @appendixsec PowerPC-specific Facilities
14 Facilities specific to PowerPC that are not specific to a particular
15 operating system are declared in @file{sys/platform/ppc.h}.
17 @deftypefun {uint64_t} __ppc_get_timebase (void)
18 Read the current value of the Time Base Register.
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}.
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
30 @deftypefun {uint64_t} __ppc_get_timebase_freq (void)
31 Read the current frequency at which the Time Base Register is updated.
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}.
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 -
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.
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.
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