@@ -102,7 +102,7 @@ void __bad_atomic_size(void);
* strex/ldrex monitor on some implementations. The reason we can use it for
* atomic_set() is the clrex or dummy strex done on every exception return.
*/
-static inline int atomic_read(atomic_t *v)
+static inline int atomic_read(const atomic_t *v)
{
return *(volatile int *)&v->counter;
}
@@ -80,7 +80,7 @@ void __bad_atomic_size(void);
} \
})
-static inline int atomic_read(atomic_t *v)
+static inline int atomic_read(const atomic_t *v)
{
return read_atomic(&v->counter);
}
@@ -32,7 +32,7 @@ typedef struct { int counter; } atomic_t;
*
* Atomically reads the value of @v.
*/
-static inline int atomic_read(atomic_t *v);
+static inline int atomic_read(const atomic_t *v);
/**
* _atomic_read - read atomic variable non-atomically