PageRenderTime 18ms CodeModel.GetById 10ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/arch/powerpc/boot/types.h

https://github.com/aicjofs/android_kernel_lge_v500_20d_f2fs
C Header | 27 lines | 22 code | 5 blank | 0 comment | 2 complexity | 7b68d4487ba26a7a29fffa0a85fad90b MD5 | raw file
 1#ifndef _TYPES_H_
 2#define _TYPES_H_
 3
 4#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
 5
 6typedef unsigned char		u8;
 7typedef unsigned short		u16;
 8typedef unsigned int		u32;
 9typedef unsigned long long	u64;
10typedef signed char		s8;
11typedef short			s16;
12typedef int			s32;
13typedef long long		s64;
14
15#define min(x,y) ({ \
16	typeof(x) _x = (x);	\
17	typeof(y) _y = (y);	\
18	(void) (&_x == &_y);	\
19	_x < _y ? _x : _y; })
20
21#define max(x,y) ({ \
22	typeof(x) _x = (x);	\
23	typeof(y) _y = (y);	\
24	(void) (&_x == &_y);	\
25	_x > _y ? _x : _y; })
26
27#endif /* _TYPES_H_ */