9 #define ROUND_UP(X, STEP) (((X) + (STEP) - 1) / (STEP) * (STEP))
10 #define DIV_ROUND_UP(X, STEP) (((X) + (STEP) - 1) / (STEP))
11 #define ROUND_DOWN(X, STEP) ((X) / (STEP) * (STEP))
13 void *memset (void *, int, size_t);
14 void *memcpy (void *, const void *, size_t);
15 void *memmove (void *, const void *, size_t);
16 void *memchr (const void *, int, size_t);
17 int memcmp (const void *, const void *, size_t);
19 char *strchr (const char *, int);
20 size_t strlcpy (char *, const char *, size_t);
21 size_t strlen (const char *);
22 int strcmp (const char *, const char *);
23 char *strtok_r (char *, const char *, char **);
25 int atoi (const char *);
27 void vprintk (const char *, va_list) PRINTF_FORMAT (1, 0);
28 void printk (const char *, ...) PRINTF_FORMAT (1, 2);
29 int vsnprintf (char *, size_t, const char *, va_list) PRINTF_FORMAT (3, 0);
30 int snprintf (char *, size_t, const char *, ...) PRINTF_FORMAT (3, 4);
32 void hex_dump (const void *, size_t size, bool ascii);
34 static inline int isdigit (int c) { return c >= '0' && c <= '9'; }
35 static inline int isprint (int c) { return c >= 32 && c < 127; }
36 static inline int isgraph (int c) { return c >= 33 && c < 127; }
37 static inline int isspace (int c) { return strchr (" \t\n\r\v", c) != NULL; }
38 static inline int islower (int c) { return c >= 'a' && c <= 'z'; }
39 static inline int isupper (int c) { return c >= 'A' && c <= 'Z'; }
40 static inline int isalpha (int c) { return islower (c) || isupper (c); }