user.h 906 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright (C) 2000 Jeff Dike (jdike@karaya.com)
  3. * Licensed under the GPL
  4. */
  5. #ifndef __USER_H__
  6. #define __USER_H__
  7. /*
  8. * The usual definition - copied here because the kernel provides its own,
  9. * fancier, type-safe, definition. Using that one would require
  10. * copying too much infrastructure for my taste, so userspace files
  11. * get less checking than kernel files.
  12. */
  13. #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
  14. /* This is to get size_t */
  15. #ifdef __KERNEL__
  16. #include <linux/types.h>
  17. #else
  18. #include <stddef.h>
  19. #endif
  20. extern void panic(const char *fmt, ...)
  21. __attribute__ ((format (printf, 1, 2)));
  22. extern int printk(const char *fmt, ...)
  23. __attribute__ ((format (printf, 1, 2)));
  24. extern void schedule(void);
  25. extern int in_aton(char *str);
  26. extern int open_gdb_chan(void);
  27. extern size_t strlcpy(char *, const char *, size_t);
  28. extern size_t strlcat(char *, const char *, size_t);
  29. #endif