Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/xen/timer/timer.c
Show First 20 Lines • Show All 256 Lines • ▼ Show 20 Lines | |||||
static int | static int | ||||
xentimer_gettime(device_t dev, struct timespec *ts) | xentimer_gettime(device_t dev, struct timespec *ts) | ||||
{ | { | ||||
struct timespec u_ts; | struct timespec u_ts; | ||||
timespecclear(ts); | timespecclear(ts); | ||||
xen_fetch_wallclock(ts); | xen_fetch_wallclock(ts); | ||||
xen_fetch_uptime(&u_ts); | xen_fetch_uptime(&u_ts); | ||||
timespecadd(ts, &u_ts); | timespecadd(ts, &u_ts, ts); | ||||
return (0); | return (0); | ||||
} | } | ||||
/** | /** | ||||
* \brief Handle a timer interrupt for the Xen PV timer driver. | * \brief Handle a timer interrupt for the Xen PV timer driver. | ||||
* | * | ||||
* \param arg Xen timer driver softc that is expecting the interrupt. | * \param arg Xen timer driver softc that is expecting the interrupt. | ||||
▲ Show 20 Lines • Show All 286 Lines • Show Last 20 Lines |