mirror of
https://github.com/mborgerson/xemu.git
synced 2025-12-01 16:10:01 +00:00
throttle: Use throttle_config_init() to initialize ThrottleConfig
We can currently initialize ThrottleConfig by zeroing all its fields, but this will change with the new fields to define the length of the burst periods. This patch introduces a new throttle_config_init() function and uses it to replace all memset() calls that initialize ThrottleConfig directly. Signed-off-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
committed by
Kevin Wolf
parent
d5851089a8
commit
1588ab5d0b
@ -114,6 +114,8 @@ void throttle_config(ThrottleState *ts,
|
||||
|
||||
void throttle_get_config(ThrottleState *ts, ThrottleConfig *cfg);
|
||||
|
||||
void throttle_config_init(ThrottleConfig *cfg);
|
||||
|
||||
/* usage */
|
||||
bool throttle_schedule_timer(ThrottleState *ts,
|
||||
ThrottleTimers *tt,
|
||||
|
||||
Reference in New Issue
Block a user