user.h 913 B

1234567891011121314151617181920212223242526272829303132
  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. /*
  15. * This will provide the size_t definition in both kernel and userspace builds
  16. */
  17. #include <linux/types.h>
  18. extern void panic(const char *fmt, ...)
  19. __attribute__ ((format (printf, 1, 2)));
  20. extern int printk(const char *fmt, ...)
  21. __attribute__ ((format (printf, 1, 2)));
  22. extern void schedule(void);
  23. extern int in_aton(char *str);
  24. extern int open_gdb_chan(void);
  25. extern size_t strlcpy(char *, const char *, size_t);
  26. extern size_t strlcat(char *, const char *, size_t);
  27. #endif