blob: d380e6d91a9055680e078fd9b379faa938229710 [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' Giarrussoc2f239d2007-05-06 14:51:52 -070017/*
18 * This will provide the size_t definition in both kernel and userspace builds
19 */
20#include <linux/types.h>
21
Paolo 'Blaisorblade' Giarrusso9cf85b32006-04-10 22:53:31 -070022extern void panic(const char *fmt, ...)
23 __attribute__ ((format (printf, 1, 2)));
24extern int printk(const char *fmt, ...)
25 __attribute__ ((format (printf, 1, 2)));
Linus Torvalds1da177e2005-04-16 15:20:36 -070026extern void schedule(void);
Linus Torvalds1da177e2005-04-16 15:20:36 -070027extern int in_aton(char *str);
28extern int open_gdb_chan(void);
Paolo 'Blaisorblade' Giarrussoc2f239d2007-05-06 14:51:52 -070029extern size_t strlcpy(char *, const char *, size_t);
30extern size_t strlcat(char *, const char *, size_t);
Linus Torvalds1da177e2005-04-16 15:20:36 -070031
32#endif