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:
Peter Fang
2019-01-10 19:03:30 -08:00
committed by wenlingz
parent 0f7535fdbe
commit 3fe4c3f2a8
5 changed files with 24 additions and 14 deletions

View File

@@ -66,7 +66,7 @@ virtio_start_timer(struct acrn_timer *timer, time_t sec, time_t nsec)
}
static void
virtio_poll_timer(void *arg)
virtio_poll_timer(void *arg, uint64_t nexp)
{
struct virtio_base *base;
struct virtio_ops *vops;

View File

@@ -110,7 +110,7 @@ static void start_wdt_timer(void);
* action to guest OS
*/
static void
wdt_expired_handler(void *arg)
wdt_expired_handler(void *arg, uint64_t nexp)
{
struct pci_vdev *dev = (struct pci_vdev *)arg;