summaryrefslogtreecommitdiff
path: root/rust/helpers/ratelimit.c
diff options
context:
space:
mode:
Diffstat (limited to 'rust/helpers/ratelimit.c')
-rw-r--r--rust/helpers/ratelimit.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/rust/helpers/ratelimit.c b/rust/helpers/ratelimit.c
new file mode 100644
index 000000000..e5052f568
--- /dev/null
+++ b/rust/helpers/ratelimit.c
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include <linux/ratelimit.h>
+
+__rust_helper void rust_helper_ratelimit_state_init(struct ratelimit_state *rs,
+ int interval, int burst)
+{
+ ratelimit_state_init(rs, interval, burst);
+}
+
+__rust_helper void rust_helper_ratelimit_state_exit(struct ratelimit_state *rs)
+{
+ ratelimit_state_exit(rs);
+}