OSDN Git Service

Bulk-extend copyright headers to 2015
[android-x86/hardware-intel-libsensors.git] / linux / utils / Atomic.h
1 /*
2  * Copyright (C) 2014-2015 Intel Corporation.
3  */
4
5 #ifndef _LINUX_ATOMIC_H
6 #define _LINUX_ATOMIC_H
7
8 int android_atomic_release_cas(int32_t oldvalue, int32_t newvalue,
9                                volatile int32_t* addr)
10 {
11         return !__sync_bool_compare_and_swap(addr, oldvalue, newvalue);
12 }
13
14 #define android_atomic_cmpxchg android_atomic_release_cas
15
16
17 #endif /* _LINUX_ATOMIC_H */