Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2000 Jeff Dike (jdike@karaya.com) |
| 3 | * Licensed under the GPL |
| 4 | */ |
| 5 | |
| 6 | #ifndef __USER_H__ |
| 7 | #define __USER_H__ |
| 8 | |
Jeff Dike | 24fa6c0 | 2007-05-06 14:51:09 -0700 | [diff] [blame] | 9 | /* |
| 10 | * The usual definition - copied here because the kernel provides its own, |
| 11 | * fancier, type-safe, definition. Using that one would require |
| 12 | * copying too much infrastructure for my taste, so userspace files |
| 13 | * get less checking than kernel files. |
| 14 | */ |
| 15 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) |
| 16 | |
Paolo 'Blaisorblade' Giarrusso | 9cf85b3 | 2006-04-10 22:53:31 -0700 | [diff] [blame] | 17 | extern void panic(const char *fmt, ...) |
| 18 | __attribute__ ((format (printf, 1, 2))); |
| 19 | extern int printk(const char *fmt, ...) |
| 20 | __attribute__ ((format (printf, 1, 2))); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | extern void schedule(void); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | extern int in_aton(char *str); |
| 23 | extern int open_gdb_chan(void); |
Paolo 'Blaisorblade' Giarrusso | a8bfb94 | 2005-09-22 21:44:14 -0700 | [diff] [blame] | 24 | /* These use size_t, however unsigned long is correct on both i386 and x86_64. */ |
| 25 | extern unsigned long strlcpy(char *, const char *, unsigned long); |
| 26 | extern unsigned long strlcat(char *, const char *, unsigned long); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 27 | |
| 28 | #endif |