aboutsummaryrefslogtreecommitdiff
path: root/qemu-options-wrapper.h
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-10-15 17:08:31 +0200
committerMarkus Armbruster <armbru@redhat.com>2015-10-29 14:34:45 +0100
commit93f8f982fedfc9ee9cf5fc8983c3b25efe828967 (patch)
tree624933100cf01b286b8b52882d4a77e345afef69 /qemu-options-wrapper.h
parent688b4b7de755f4dd01ec516975ae01590cf9f438 (diff)
monitor: Simplify event throttling
The event throttling state machine is hard to understand. I'm not sure it's entirely correct. Rewrite it in a more straightforward manner: State 1: No event sent recently (less than evconf->rate ns ago) Invariant: evstate->timer is not pending, evstate->qdict is null On event: send event, arm timer, goto state 2 State 2: Event sent recently, no additional event being delayed Invariant: evstate->timer is pending, evstate->qdict is null On event: store it in evstate->qdict, goto state 3 On timer: goto state 1 State 3: Event sent recently, additional event being delayed Invariant: evstate->timer is pending, evstate->qdict is non-null On event: store it in evstate->qdict, goto state 3 On timer: send evstate->qdict, clear evstate->qdict, arm timer, goto state 2 Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1444921716-9511-3-git-send-email-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'qemu-options-wrapper.h')
0 files changed, 0 insertions, 0 deletions