diff options
author | Srikant Patnaik | 2015-01-11 12:28:04 +0530 |
---|---|---|
committer | Srikant Patnaik | 2015-01-11 12:28:04 +0530 |
commit | 871480933a1c28f8a9fed4c4d34d06c439a7a422 (patch) | |
tree | 8718f573808810c2a1e8cb8fb6ac469093ca2784 /ANDROID_3.4.5/include/asm-generic/cmpxchg-local.h | |
parent | 9d40ac5867b9aefe0722bc1f110b965ff294d30d (diff) | |
download | FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.gz FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.bz2 FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.zip |
Moved, renamed, and deleted files
The original directory structure was scattered and unorganized.
Changes are basically to make it look like kernel structure.
Diffstat (limited to 'ANDROID_3.4.5/include/asm-generic/cmpxchg-local.h')
-rw-r--r-- | ANDROID_3.4.5/include/asm-generic/cmpxchg-local.h | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/ANDROID_3.4.5/include/asm-generic/cmpxchg-local.h b/ANDROID_3.4.5/include/asm-generic/cmpxchg-local.h deleted file mode 100644 index 2533fddd..00000000 --- a/ANDROID_3.4.5/include/asm-generic/cmpxchg-local.h +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef __ASM_GENERIC_CMPXCHG_LOCAL_H -#define __ASM_GENERIC_CMPXCHG_LOCAL_H - -#include <linux/types.h> -#include <linux/irqflags.h> - -extern unsigned long wrong_size_cmpxchg(volatile void *ptr); - -/* - * Generic version of __cmpxchg_local (disables interrupts). Takes an unsigned - * long parameter, supporting various types of architectures. - */ -static inline unsigned long __cmpxchg_local_generic(volatile void *ptr, - unsigned long old, unsigned long new, int size) -{ - unsigned long flags, prev; - - /* - * Sanity checking, compile-time. - */ - if (size == 8 && sizeof(unsigned long) != 8) - wrong_size_cmpxchg(ptr); - - local_irq_save(flags); - switch (size) { - case 1: prev = *(u8 *)ptr; - if (prev == old) - *(u8 *)ptr = (u8)new; - break; - case 2: prev = *(u16 *)ptr; - if (prev == old) - *(u16 *)ptr = (u16)new; - break; - case 4: prev = *(u32 *)ptr; - if (prev == old) - *(u32 *)ptr = (u32)new; - break; - case 8: prev = *(u64 *)ptr; - if (prev == old) - *(u64 *)ptr = (u64)new; - break; - default: - wrong_size_cmpxchg(ptr); - } - local_irq_restore(flags); - return prev; -} - -/* - * Generic version of __cmpxchg64_local. Takes an u64 parameter. - */ -static inline u64 __cmpxchg64_local_generic(volatile void *ptr, - u64 old, u64 new) -{ - u64 prev; - unsigned long flags; - - local_irq_save(flags); - prev = *(u64 *)ptr; - if (prev == old) - *(u64 *)ptr = new; - local_irq_restore(flags); - return prev; -} - -#endif |