[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 2/2] fix: make atomic_read() param const
This wouldn't let me make a param of a function that used atomic_read() const. Signed-off-by: Corneliu ZUZU <czuzu@xxxxxxxxxxxxxxx> --- xen/include/asm-arm/atomic.h | 2 +- xen/include/asm-x86/atomic.h | 2 +- xen/include/xen/atomic.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/include/asm-arm/atomic.h b/xen/include/asm-arm/atomic.h index 8e8c5d1..cd86cf0 100644 --- a/xen/include/asm-arm/atomic.h +++ b/xen/include/asm-arm/atomic.h @@ -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; } diff --git a/xen/include/asm-x86/atomic.h b/xen/include/asm-x86/atomic.h index 9bf4bc1..a16f0f6 100644 --- a/xen/include/asm-x86/atomic.h +++ b/xen/include/asm-x86/atomic.h @@ -86,7 +86,7 @@ void __bad_atomic_size(void); * * Atomically reads the value of @v. */ -static inline int atomic_read(atomic_t *v) +static inline int atomic_read(const atomic_t *v) { return read_atomic(&v->counter); } diff --git a/xen/include/xen/atomic.h b/xen/include/xen/atomic.h index 5d5c051..6cbc6d8 100644 --- a/xen/include/xen/atomic.h +++ b/xen/include/xen/atomic.h @@ -37,7 +37,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 -- 2.5.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |