/* some helper functions for xen and kvm pv clock sources */
u64 pvclock_clocksource_read(struct pvclock_vcpu_time_info *src);
u8 pvclock_read_flags(struct pvclock_vcpu_time_info *src); void pvclock_set_flags(u8 flags); unsignedlong pvclock_tsc_khz(struct pvclock_vcpu_time_info *src); void pvclock_resume(void);
void pvclock_touch_watchdogs(void);
static __always_inline unsigned pvclock_read_begin(conststruct pvclock_vcpu_time_info *src)
{ unsigned version = src->version & ~1; /* Make sure that the version is read before the data. */
rmb(); return version;
}
static __always_inline bool pvclock_read_retry(conststruct pvclock_vcpu_time_info *src, unsigned version)
{ /* Make sure that the version is re-read after the data. */
rmb(); return version != src->version;
}
/* * Scale a 64-bit delta by scaling and multiplying by a 32-bit fraction, * yielding a 64-bit result.
*/ staticinline u64 pvclock_scale_delta(u64 delta, u32 mul_frac, int shift)
{
u64 product; #ifdef __i386__
u32 tmp1, tmp2; #else unsignedlong tmp; #endif
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.