aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic/atomic.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-generic/atomic.h')
-rw-r--r--include/asm-generic/atomic.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/include/asm-generic/atomic.h b/include/asm-generic/atomic.h
index c33749f95b32..058129e9b04c 100644
--- a/include/asm-generic/atomic.h
+++ b/include/asm-generic/atomic.h
@@ -30,8 +30,7 @@
30 * atomic_read - read atomic variable 30 * atomic_read - read atomic variable
31 * @v: pointer of type atomic_t 31 * @v: pointer of type atomic_t
32 * 32 *
33 * Atomically reads the value of @v. Note that the guaranteed 33 * Atomically reads the value of @v.
34 * useful range of an atomic_t is only 24 bits.
35 */ 34 */
36#define atomic_read(v) (*(volatile int *)&(v)->counter) 35#define atomic_read(v) (*(volatile int *)&(v)->counter)
37 36
@@ -40,8 +39,7 @@
40 * @v: pointer of type atomic_t 39 * @v: pointer of type atomic_t
41 * @i: required value 40 * @i: required value
42 * 41 *
43 * Atomically sets the value of @v to @i. Note that the guaranteed 42 * Atomically sets the value of @v to @i.
44 * useful range of an atomic_t is only 24 bits.
45 */ 43 */
46#define atomic_set(v, i) (((v)->counter) = (i)) 44#define atomic_set(v, i) (((v)->counter) = (i))
47 45
@@ -53,7 +51,6 @@
53 * @v: pointer of type atomic_t 51 * @v: pointer of type atomic_t
54 * 52 *
55 * Atomically adds @i to @v and returns the result 53 * Atomically adds @i to @v and returns the result
56 * Note that the guaranteed useful range of an atomic_t is only 24 bits.
57 */ 54 */
58static inline int atomic_add_return(int i, atomic_t *v) 55static inline int atomic_add_return(int i, atomic_t *v)
59{ 56{
@@ -75,7 +72,6 @@ static inline int atomic_add_return(int i, atomic_t *v)
75 * @v: pointer of type atomic_t 72 * @v: pointer of type atomic_t
76 * 73 *
77 * Atomically subtracts @i from @v and returns the result 74 * Atomically subtracts @i from @v and returns the result
78 * Note that the guaranteed useful range of an atomic_t is only 24 bits.
79 */ 75 */
80static inline int atomic_sub_return(int i, atomic_t *v) 76static inline int atomic_sub_return(int i, atomic_t *v)
81{ 77{