qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/5] throttle: introduce enum ThrottleTimerType


From: Alberto Garcia
Subject: Re: [PATCH 1/5] throttle: introduce enum ThrottleTimerType
Date: Mon, 26 Jun 2023 21:24:48 +0000

On Sun 25 Jun 2023 04:56:27 PM +08, zhenwei pi wrote:
> Use enum ThrottleTimerType instead of number index.

> +typedef enum {
> +    THROTTLE_TIMER_READ = 0,
> +    THROTTLE_TIMER_WRITE,
> +    THROTTLE_TIMER_MAX
> +} ThrottleTimerType;

If you're doing this I suppose you could also change 'bool is_write'
with something like 'ThrottleTimerType timer', i.e

static bool throttle_compute_timer(ThrottleState *ts,
                                   ThrottleTimerType timer,
                                   int64_t now,
                                   int64_t *next_timestamp)

Berto



reply via email to

[Prev in Thread] Current Thread [Next in Thread]