25 #ifndef __MOTR_ST_ST_MISC_H__ 26 #define __MOTR_ST_ST_MISC_H__ 30 # include <linux/kernel.h> 31 # include <linux/ctype.h> 32 # include <linux/string.h> 33 # include <linux/types.h> 35 #define str_dup(s) kstrdup((s), GFP_KERNEL) 42 #define LOG_PREFIX "." 52 #define str_dup(s) strdup((s)) 58 #define str_eq(a, b) (strcmp((a), (b)) == 0) 80 #define MEM_ALLOC_ARR(arr, nr) ((arr) = mem_alloc((nr) * sizeof ((arr)[0]))) 81 #define MEM_ALLOC_PTR(arr) MEM_ALLOC_ARR(arr, 1) static struct m0_addb2_philter p
uint64_t time_seconds(const uint64_t time)
uint64_t time_from_now(uint64_t secs, uint64_t ns)
static long long max(long long a, long long b)
char * fmt(const char *format,...) __attribute__((format(printf
void * mem_alloc(size_t size)
void console_printf(const char *fmt,...)
uint32_t generate_random(uint32_t max)
uint64_t time_nanoseconds(const uint64_t time)