mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-07 09:41:30 +00:00
dm: provide timer callback handlers the number of expirations
It is possible for multiple timeouts to occur in one mevent epoll iteration. Providing the number of timer expirations to the timer callback handlers can be useful. E.g., this could improve emulation of timing-sensitive hardware components. Tracked-On: #2319 Signed-off-by: Peter Fang <peter.fang@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
@@ -660,7 +660,7 @@ vrtc_time_update(struct vrtc *vrtc, time_t newtime, time_t newbase)
|
||||
}
|
||||
|
||||
static void
|
||||
vrtc_periodic_timer(void *arg)
|
||||
vrtc_periodic_timer(void *arg, uint64_t nexp)
|
||||
{
|
||||
struct vrtc *vrtc = arg;
|
||||
|
||||
@@ -673,13 +673,14 @@ vrtc_periodic_timer(void *arg)
|
||||
}
|
||||
|
||||
static void
|
||||
vrtc_update_timer(void *arg)
|
||||
vrtc_update_timer(void *arg, uint64_t nexp)
|
||||
{
|
||||
struct vrtc *vrtc = arg;
|
||||
time_t basetime;
|
||||
time_t curtime;
|
||||
|
||||
pthread_mutex_lock(&vrtc->mtx);
|
||||
|
||||
if (aintr_enabled(vrtc) || uintr_enabled(vrtc)) {
|
||||
curtime = vrtc_curtime(vrtc, &basetime);
|
||||
vrtc_time_update(vrtc, curtime, basetime);
|
||||
|
||||
Reference in New Issue
Block a user