summaryrefslogtreecommitdiff
path: root/src/shared/ratelimit.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-07-04 00:23:42 +0200
committerLennart Poettering <lennart@poettering.net>2012-07-04 00:23:42 +0200
commit451b34cc1d74960ee0262eef970a6346ec814f31 (patch)
tree8781bb56a2846f6d870e002593d3ccecb787bcd5 /src/shared/ratelimit.h
parent6ffd3337867076067955ec4d5d1a0cde521d9b86 (diff)
service: flush the start counter in "systemctl reset-failed"
Diffstat (limited to 'src/shared/ratelimit.h')
-rw-r--r--src/shared/ratelimit.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/shared/ratelimit.h b/src/shared/ratelimit.h
index 07e8205c8..ad00267a6 100644
--- a/src/shared/ratelimit.h
+++ b/src/shared/ratelimit.h
@@ -48,6 +48,13 @@ typedef struct RateLimit {
_r->begin = 0; \
} while (false)
+#define RATELIMIT_RESET(v) \
+ do { \
+ RateLimit *_r = &(v); \
+ _r->num = 0; \
+ _r->begin = 0; \
+ } while (false)
+
bool ratelimit_test(RateLimit *r);
#endif