diff options
author | Kenny Levinsen <kl@kl.wtf> | 2020-08-01 23:10:24 +0200 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2020-08-01 23:13:54 +0200 |
commit | d26466bf3bbd15d609e471202edb09dbc555fbe6 (patch) | |
tree | 16ef88d8276e3961c72f00b46fa844c332f3237f /common | |
parent | 2be0826959c68aa0dd756ee4437db1883887d8ce (diff) | |
download | seatd-d26466bf3bbd15d609e471202edb09dbc555fbe6.tar.xz |
Remove ALWAYS_INLINE
Didn't do what I wanted it to anyway.
Diffstat (limited to 'common')
-rw-r--r-- | common/connection.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/common/connection.c b/common/connection.c index 0c2a0b6..a6739c0 100644 --- a/common/connection.c +++ b/common/connection.c @@ -6,22 +6,21 @@ #include <sys/socket.h> #include <unistd.h> -#include "compiler.h" #include "connection.h" -ALWAYS_INLINE static uint32_t connection_buffer_mask(const uint32_t idx) { +static inline uint32_t connection_buffer_mask(const uint32_t idx) { return idx & (CONNECTION_BUFFER_SIZE - 1); } -ALWAYS_INLINE static uint32_t connection_buffer_size(const struct connection_buffer *b) { +static inline uint32_t connection_buffer_size(const struct connection_buffer *b) { return b->head - b->tail; } -ALWAYS_INLINE static void connection_buffer_consume(struct connection_buffer *b, const size_t size) { +static inline void connection_buffer_consume(struct connection_buffer *b, const size_t size) { b->tail += size; } -ALWAYS_INLINE static void connection_buffer_restore(struct connection_buffer *b, const size_t size) { +static inline void connection_buffer_restore(struct connection_buffer *b, const size_t size) { b->tail -= size; } |