user.h 911 B

12345678910111213141516171819202122232425262728
  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. extern void panic(const char *fmt, ...)
  15. __attribute__ ((format (printf, 1, 2)));
  16. extern int printk(const char *fmt, ...)
  17. __attribute__ ((format (printf, 1, 2)));
  18. extern void schedule(void);
  19. extern int in_aton(char *str);
  20. extern int open_gdb_chan(void);
  21. /* These use size_t, however unsigned long is correct on both i386 and x86_64. */
  22. extern unsigned long strlcpy(char *, const char *, unsigned long);
  23. extern unsigned long strlcat(char *, const char *, unsigned long);
  24. #endif