serve

serve.git
git clone git://git.lenczewski.org/serve.git
Log | Files | Refs

utils.c (896B)


      1 #include "website.h"
      2 
      3 extern inline char *
      4 strnstr(char *restrict str, size_t len, char const *restrict needle);
      5 
      6 extern inline void
      7 arena_reset(struct arena *arena);
      8 
      9 extern inline void *
     10 arena_alloc(struct arena *arena, uint64_t size, uint64_t align);
     11 
     12 extern inline void
     13 list_push_head(struct list *restrict list, struct list_node *restrict node);
     14 
     15 extern inline void
     16 list_push_tail(struct list *restrict list, struct list_node *restrict node);
     17 
     18 extern inline struct list_node *
     19 list_pop_head(struct list *list);
     20 
     21 extern inline struct list_node *
     22 list_pop_tail(struct list *list);
     23 
     24 extern inline struct timespec
     25 get_timeout(struct timespec const *ts, uint64_t timeout_ms);
     26 
     27 extern inline uint64_t
     28 get_timestamp(struct timespec const *ts);
     29 
     30 extern inline void
     31 timespec_diff(struct timespec const *restrict lhs,
     32 	      struct timespec const *restrict rhs,
     33 	      struct timespec *restrict res);