diff options
author | MCApollo <34170230+MCApollo@users.noreply.github.com> | 2019-04-29 17:53:00 +0000 |
---|---|---|
committer | MCApollo <34170230+MCApollo@users.noreply.github.com> | 2019-04-29 17:53:00 +0000 |
commit | 59f5fd20e2f59ae186d5a461aef7782dd55e4e7b (patch) | |
tree | 10475faf0b6dcb812b64da679f4ae8ff01c45874 /data/lighttpd/lighttpd-1.4.53/src/status_counter.h | |
parent | f06e297cd175cca39745f6d1970225ae88aa68f1 (diff) |
Updated lighttpd.
Diffstat (limited to 'data/lighttpd/lighttpd-1.4.53/src/status_counter.h')
-rw-r--r-- | data/lighttpd/lighttpd-1.4.53/src/status_counter.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/data/lighttpd/lighttpd-1.4.53/src/status_counter.h b/data/lighttpd/lighttpd-1.4.53/src/status_counter.h new file mode 100644 index 000000000..cdbd5c137 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/src/status_counter.h @@ -0,0 +1,42 @@ +#ifndef _STATUS_COUNTER_H_ +#define _STATUS_COUNTER_H_ +#include "first.h" + +#include "base_decls.h" + +static inline +int *status_counter_get_counter(server *srv, const char *s, size_t len); +static inline +void status_counter_inc(server *srv, const char *s, size_t len); +static inline +void status_counter_dec(server *srv, const char *s, size_t len); +static inline +void status_counter_set(server *srv, const char *s, size_t len, int val); + +/* inline status counter routines */ + +#include "base.h" /* (srv->status) */ +#include "array.h" + +static inline +int *status_counter_get_counter(server *srv, const char *s, size_t len) { + return array_get_int_ptr(srv->status, s, len); +} + +static inline +void status_counter_inc(server *srv, const char *s, size_t len) { + ++(*array_get_int_ptr(srv->status, s, len)); +} + +static inline +void status_counter_dec(server *srv, const char *s, size_t len) { + --(*array_get_int_ptr(srv->status, s, len)); +} + +static inline +void status_counter_set(server *srv, const char *s, size_t len, int val) { + *array_get_int_ptr(srv->status, s, len) = val; +} + + +#endif |