1 #ifndef __BASIC_TYPES_H__
2 #define __BASIC_TYPES_H__
3 
4 #define SUCCESS	0
5 #define FAIL	(-1)
6 
7 #include <linux/types.h>
8 
9 #define SIZE_T __kernel_size_t
10 #define sint signed int
11 #define FIELD_OFFSET(s, field)	((addr_t)&((s *)(0))->field)
12 
13 /* Should we extend this to be host_addr_t and target_addr_t for case:
14  *	host : x86_64
15  *	target : mips64
16  */
17 #define addr_t unsigned long
18 
19 #define MEM_ALIGNMENT_OFFSET	(sizeof(SIZE_T))
20 #define MEM_ALIGNMENT_PADDING	(sizeof(SIZE_T) - 1)
21 
22 #endif /*__BASIC_TYPES_H__*/
23 
24