um: finish conversion to mcontext_t
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / arch / um / include / shared / user.h
blob4fa82c055aab8d53576b06787aa1033644a16697
1 /*
2 * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL
4 */
6 #ifndef __USER_H__
7 #define __USER_H__
9 #include <generated/asm-offsets.h>
12 * The usual definition - copied here because the kernel provides its own,
13 * fancier, type-safe, definition. Using that one would require
14 * copying too much infrastructure for my taste, so userspace files
15 * get less checking than kernel files.
17 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
19 /* This is to get size_t */
20 #ifdef __KERNEL__
21 #include <linux/types.h>
22 #else
23 #include <stddef.h>
24 #endif
26 extern void panic(const char *fmt, ...)
27 __attribute__ ((format (printf, 1, 2)));
29 #ifdef UML_CONFIG_PRINTK
30 extern int printk(const char *fmt, ...)
31 __attribute__ ((format (printf, 1, 2)));
32 #else
33 static inline int printk(const char *fmt, ...)
35 return 0;
37 #endif
39 extern int in_aton(char *str);
40 extern size_t strlcpy(char *, const char *, size_t);
41 extern size_t strlcat(char *, const char *, size_t);
43 /* Copied from linux/compiler-gcc.h since we can't include it directly */
44 #define barrier() __asm__ __volatile__("": : :"memory")
46 #endif