mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-10 13:19:31 +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:
@@ -10,12 +10,12 @@ struct acrn_timer {
|
||||
int32_t fd;
|
||||
int32_t clockid;
|
||||
struct mevent *mevp;
|
||||
void (*callback)(void *);
|
||||
void (*callback)(void *, uint64_t);
|
||||
void *callback_param;
|
||||
};
|
||||
|
||||
int32_t
|
||||
acrn_timer_init(struct acrn_timer *timer, void (*cb)(void *), void *param);
|
||||
acrn_timer_init(struct acrn_timer *timer, void (*cb)(void *, uint64_t), void *param);
|
||||
void
|
||||
acrn_timer_deinit(struct acrn_timer *timer);
|
||||
int32_t
|
||||
|
Reference in New Issue
Block a user