mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
qapi event: clean up in callers
This patch improves docs and address small issues in event callers. Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
parent
d6f9c82c62
commit
2f44a08b3e
6 changed files with 11 additions and 9 deletions
|
@ -570,6 +570,7 @@ monitor_qapi_event_throttle(QAPIEvent event, int64_t rate)
|
|||
|
||||
trace_monitor_protocol_event_throttle(event, rate);
|
||||
evstate->event = event;
|
||||
assert(rate * SCALE_MS <= INT64_MAX);
|
||||
evstate->rate = rate * SCALE_MS;
|
||||
evstate->last = 0;
|
||||
evstate->data = NULL;
|
||||
|
@ -585,7 +586,6 @@ static void monitor_qapi_event_init(void)
|
|||
monitor_qapi_event_throttle(QAPI_EVENT_RTC_CHANGE, 1000);
|
||||
monitor_qapi_event_throttle(QAPI_EVENT_WATCHDOG, 1000);
|
||||
monitor_qapi_event_throttle(QAPI_EVENT_BALLOON_CHANGE, 1000);
|
||||
/* limit the rate of quorum events to avoid hammering the management */
|
||||
monitor_qapi_event_throttle(QAPI_EVENT_QUORUM_REPORT_BAD, 1000);
|
||||
monitor_qapi_event_throttle(QAPI_EVENT_QUORUM_FAILURE, 1000);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue