libk.h (647B)
1 #ifndef _KERNEL_LIBK_H_ 2 #define _KERNEL_LIBK_H_ 3 4 #include <stddef.h> 5 #include <stdint.h> 6 #include <stdarg.h> 7 8 #include <sys/io.h> 9 #include <sys/tty.h> 10 11 #define BUFSIZ 1024 12 13 #define ARRLEN(x) (sizeof(x) / sizeof((x)[0])) 14 #define UNUSED(x) ((void)(x)) 15 #define sizeof_field(s, f) (sizeof(((t *)0)->f)) 16 17 void *memset(void *, int, size_t); 18 void *memcpy(void *, const void *, size_t); 19 size_t strlen(const char *); 20 int strcmp(const char *, const char *); 21 int vsprintf(char *, const char *, va_list); 22 int sprintf(char *, const char *, ...); 23 /* TODO: kprintf */ 24 int printf(const char *, ...); 25 void panic(const char *, ...); 26 27 #endif /* _KERNEL_LIBK_H_ */