linux/include/linux/ratelimit_types.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_RATELIMIT_TYPES_H
#define _LINUX_RATELIMIT_TYPES_H

#include <linux/bits.h>
#include <linux/param.h>
#include <linux/spinlock_types_raw.h>

#define DEFAULT_RATELIMIT_INTERVAL
#define DEFAULT_RATELIMIT_BURST

/* issue num suppressed message on exit */
#define RATELIMIT_MSG_ON_RELEASE

struct ratelimit_state {};

#define RATELIMIT_STATE_INIT_FLAGS(name, interval_init, burst_init, flags_init)

#define RATELIMIT_STATE_INIT(name, interval_init, burst_init)

#define RATELIMIT_STATE_INIT_DISABLED

#define DEFINE_RATELIMIT_STATE(name, interval_init, burst_init)	\

extern int ___ratelimit(struct ratelimit_state *rs, const char *func);
#define __ratelimit(state)

#endif /* _LINUX_RATELIMIT_TYPES_H */