blob: a6da626082544fcc3adbd71c199dd7bf1582c996 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
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 Dike24fa6c02007-05-06 14:51:09 -07009/*
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' Giarrusso9cf85b32006-04-10 22:53:31 -070017extern void panic(const char *fmt, ...)
18 __attribute__ ((format (printf, 1, 2)));
19extern int printk(const char *fmt, ...)
20 __attribute__ ((format (printf, 1, 2)));
Linus Torvalds1da177e2005-04-16 15:20:36 -070021extern void schedule(void);
Linus Torvalds1da177e2005-04-16 15:20:36 -070022extern int in_aton(char *str);
23extern int open_gdb_chan(void);
Paolo 'Blaisorblade' Giarrussoa8bfb942005-09-22 21:44:14 -070024/* These use size_t, however unsigned long is correct on both i386 and x86_64. */
25extern unsigned long strlcpy(char *, const char *, unsigned long);
26extern unsigned long strlcat(char *, const char *, unsigned long);
Linus Torvalds1da177e2005-04-16 15:20:36 -070027
28#endif