提交 3c9242f5 编写于 作者: A Alberto Garcia 提交者: Kevin Wolf

throttle: Make throttle_compute_timer() static

This function is only used internally in throttle.c
Signed-off-by: NAlberto Garcia <berto@igalia.com>
Reviewed-by: NKevin Wolf <kwolf@redhat.com>
Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
上级 9bd9c7f5
...@@ -84,12 +84,6 @@ void throttle_leak_bucket(LeakyBucket *bkt, int64_t delta); ...@@ -84,12 +84,6 @@ void throttle_leak_bucket(LeakyBucket *bkt, int64_t delta);
int64_t throttle_compute_wait(LeakyBucket *bkt); int64_t throttle_compute_wait(LeakyBucket *bkt);
/* expose timer computation function for unit tests */
bool throttle_compute_timer(ThrottleState *ts,
bool is_write,
int64_t now,
int64_t *next_timestamp);
/* init/destroy cycle */ /* init/destroy cycle */
void throttle_init(ThrottleState *ts); void throttle_init(ThrottleState *ts);
......
...@@ -137,10 +137,10 @@ static int64_t throttle_compute_wait_for(ThrottleState *ts, ...@@ -137,10 +137,10 @@ static int64_t throttle_compute_wait_for(ThrottleState *ts,
* @next_timestamp: the resulting timer * @next_timestamp: the resulting timer
* @ret: true if a timer must be set * @ret: true if a timer must be set
*/ */
bool throttle_compute_timer(ThrottleState *ts, static bool throttle_compute_timer(ThrottleState *ts,
bool is_write, bool is_write,
int64_t now, int64_t now,
int64_t *next_timestamp) int64_t *next_timestamp)
{ {
int64_t wait; int64_t wait;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册