1 /* 2 * Copyright (c) 2011 The Chromium OS Authors. 3 * 4 * See file CREDITS for list of people who contributed to this 5 * project. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License as 9 * published by the Free Software Foundation; either version 2 of 10 * the License, or (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 20 * MA 02111-1307 USA 21 */ 22 23 #ifndef __ASM_SANDBOX_TYPES_H 24 #define __ASM_SANDBOX_TYPES_H 25 26 typedef unsigned short umode_t; 27 28 /* 29 * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 30 * header files exported to user space 31 */ 32 33 typedef __signed__ char __s8; 34 typedef unsigned char __u8; 35 36 typedef __signed__ short __s16; 37 typedef unsigned short __u16; 38 39 typedef __signed__ int __s32; 40 typedef unsigned int __u32; 41 42 #if defined(__GNUC__) 43 __extension__ typedef __signed__ long long __s64; 44 __extension__ typedef unsigned long long __u64; 45 #endif 46 47 /* 48 * These aren't exported outside the kernel to avoid name space clashes 49 */ 50 #ifdef __KERNEL__ 51 52 typedef signed char s8; 53 typedef unsigned char u8; 54 55 typedef signed short s16; 56 typedef unsigned short u16; 57 58 typedef signed int s32; 59 typedef unsigned int u32; 60 61 typedef signed long long s64; 62 typedef unsigned long long u64; 63 64 #define BITS_PER_LONG CONFIG_SANDBOX_BITS_PER_LONG 65 66 typedef unsigned long dma_addr_t; 67 typedef unsigned long phys_addr_t; 68 typedef unsigned long phys_size_t; 69 70 #endif /* __KERNEL__ */ 71 72 #endif 73