mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-01-31 21:30:38 -07:00
migration: Move self_announce_delay() to misc.h
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Laurent Vivier <lvivier@redhat.com>
This commit is contained in:
parent
543147116e
commit
f8d806c992
4 changed files with 12 additions and 10 deletions
|
|
@ -26,4 +26,14 @@ void blk_mig_init(void);
|
|||
static inline void blk_mig_init(void) {}
|
||||
#endif
|
||||
|
||||
#define SELF_ANNOUNCE_ROUNDS 5
|
||||
|
||||
static inline
|
||||
int64_t self_announce_delay(int round)
|
||||
{
|
||||
assert(round < SELF_ANNOUNCE_ROUNDS && round > 0);
|
||||
/* delay 50ms, 150ms, 250ms, ... */
|
||||
return 50 + (SELF_ANNOUNCE_ROUNDS - round - 1) * 100;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue