@node Platform, Contributors, Maintenance, Top @c %MENU% Describe all platform-specific facilities provided @appendix Platform-specific facilities @Theglibc{} can provide machine-specific functionality. @menu * PowerPC:: Facilities Specific to the PowerPC Architecture @end menu @node PowerPC @appendixsec PowerPC-specific Facilities Facilities specific to PowerPC that are not specific to a particular operating system are declared in @file{sys/platform/ppc.h}. @deftypefun {uint64_t} __ppc_get_timebase (void) Read the current value of the Time Base Register. The @dfn{Time Base Register} is a 64-bit register that stores a monotonically incremented value updated at a system-dependent frequency that may be different from the processor frequency. More information is available in @cite{Power ISA 2.06b - Book II - Section 5.2}. @code{__ppc_get_timebase} uses the processor's time base facility directly without requiring assistance from the operating system, so it is very efficient. @end deftypefun @deftypefun {uint64_t} __ppc_get_timebase_freq (void) Read the current frequency at which the Time Base Register is updated. This frequency is not related to the processor clock or the bus clock. It is also possible that this frequency is not constant. More information is available in @cite{Power ISA 2.06b - Book II - Section 5.2}. @end deftypefun The following functions provide hints about the usage of resources that are shared with other processors. They can be used, for example, if a program waiting on a lock intends to divert the shared resources to be used by other processors. More information is available in @cite{Power ISA 2.06b - Book II - Section 3.2}. @deftypefun {void} __ppc_yield (void) Provide a hint that performance will probably be improved if shared resources dedicated to the executing processor are released for use by other processors. @end deftypefun @deftypefun {void} __ppc_mdoio (void) Provide a hint that performance will probably be improved if shared resources dedicated to the executing processor are released until all outstanding storage accesses to caching-inhibited storage have been completed. @end deftypefun @deftypefun {void} __ppc_mdoom (void) Provide a hint that performance will probably be improved if shared resources dedicated to the executing processor are released until all outstanding storage accesses to cacheable storage for which the data is not in the cache have been completed. @end deftypefun