From 392e8802486cb573b916e746010e141a75f507e6 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 15 Nov 2014 09:58:27 +0800 Subject: init android origin source code --- ANDROID_3.4.5/include/asm-generic/unaligned.h | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 ANDROID_3.4.5/include/asm-generic/unaligned.h (limited to 'ANDROID_3.4.5/include/asm-generic/unaligned.h') diff --git a/ANDROID_3.4.5/include/asm-generic/unaligned.h b/ANDROID_3.4.5/include/asm-generic/unaligned.h new file mode 100644 index 00000000..03cf5936 --- /dev/null +++ b/ANDROID_3.4.5/include/asm-generic/unaligned.h @@ -0,0 +1,30 @@ +#ifndef __ASM_GENERIC_UNALIGNED_H +#define __ASM_GENERIC_UNALIGNED_H + +/* + * This is the most generic implementation of unaligned accesses + * and should work almost anywhere. + * + * If an architecture can handle unaligned accesses in hardware, + * it may want to use the linux/unaligned/access_ok.h implementation + * instead. + */ +#include + +#if defined(__LITTLE_ENDIAN) +# include +# include +# include +# define get_unaligned __get_unaligned_le +# define put_unaligned __put_unaligned_le +#elif defined(__BIG_ENDIAN) +# include +# include +# include +# define get_unaligned __get_unaligned_be +# define put_unaligned __put_unaligned_be +#else +# error need to define endianess +#endif + +#endif /* __ASM_GENERIC_UNALIGNED_H */ -- cgit