summaryrefslogtreecommitdiffstats
path: root/include/qemu/throttle.h
diff options
context:
space:
mode:
authorAlberto Garcia <berto@igalia.com>2016-02-18 12:27:00 +0200
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:45:30 -0600
commit239637b7786187b1aa2cad38874caf697287f1bb (patch)
treebdc78ad06e676df4e15d6240c318064e9d067850 /include/qemu/throttle.h
parent71908189be33dd780fab9cd441a812f2e186f138 (diff)
downloadhqemu-239637b7786187b1aa2cad38874caf697287f1bb.zip
hqemu-239637b7786187b1aa2cad38874caf697287f1bb.tar.gz
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>
Diffstat (limited to 'include/qemu/throttle.h')
-rw-r--r--include/qemu/throttle.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/qemu/throttle.h b/include/qemu/throttle.h
index aec0785..8ec8951 100644
--- a/include/qemu/throttle.h
+++ b/include/qemu/throttle.h
@@ -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,
OpenPOWER on IntegriCloud