This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / arch / um / kernel / skas / include / uaccess-skas.h
1 /*
2  * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3  * Licensed under the GPL
4  */
5
6 #ifndef __SKAS_UACCESS_H
7 #define __SKAS_UACCESS_H
8
9 #include "asm/errno.h"
10
11 #define access_ok_skas(type, addr, size) \
12         ((segment_eq(get_fs(), KERNEL_DS)) || \
13          (((unsigned long) (addr) < TASK_SIZE) && \
14           ((unsigned long) (addr) + (size) <= TASK_SIZE)))
15
16 static inline int verify_area_skas(int type, const void * addr,
17                                    unsigned long size)
18 {
19         return(access_ok_skas(type, addr, size) ? 0 : -EFAULT);
20 }
21
22 extern int copy_from_user_skas(void *to, const void *from, int n);
23 extern int copy_to_user_skas(void *to, const void *from, int n);
24 extern int strncpy_from_user_skas(char *dst, const char *src, int count);
25 extern int __clear_user_skas(void *mem, int len);
26 extern int clear_user_skas(void *mem, int len);
27 extern int strnlen_user_skas(const void *str, int len);
28
29 #endif
30
31 /*
32  * Overrides for Emacs so that we follow Linus's tabbing style.
33  * Emacs will notice this stuff at the end of the file and automatically
34  * adjust the settings for this buffer only.  This must remain at the end
35  * of the file.
36  * ---------------------------------------------------------------------------
37  * Local variables:
38  * c-file-style: "linux"
39  * End:
40  */