[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] asm-arm/atomic.h: atomic_{inc, dec}_return: macros to inline functions
commit dc8ed019c4dff150f20a942d09d9f39a9e19c7df Author: Corneliu ZUZU <czuzu@xxxxxxxxxxxxxxx> AuthorDate: Fri Jul 15 13:46:00 2016 +0300 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Fri Jul 15 13:33:56 2016 +0100 asm-arm/atomic.h: atomic_{inc, dec}_return: macros to inline functions Turn atomic_inc_return and atomic_dec_return atomic.h macros to inline functions. Signed-off-by: Corneliu ZUZU <czuzu@xxxxxxxxxxxxxxx> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> --- xen/include/asm-arm/atomic.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/xen/include/asm-arm/atomic.h b/xen/include/asm-arm/atomic.h index 91f05c8..f060c5a 100644 --- a/xen/include/asm-arm/atomic.h +++ b/xen/include/asm-arm/atomic.h @@ -130,9 +130,6 @@ static inline void _atomic_set(atomic_t *v, int i) # error "unknown ARM variant" #endif -#define atomic_inc_return(v) (atomic_add_return(1, v)) -#define atomic_dec_return(v) (atomic_sub_return(1, v)) - static inline int atomic_sub_and_test(int i, atomic_t *v) { return atomic_sub_return(i, v) == 0; @@ -143,6 +140,11 @@ static inline void atomic_inc(atomic_t *v) atomic_add(1, v); } +static inline int atomic_inc_return(atomic_t *v) +{ + return atomic_add_return(1, v); +} + static inline int atomic_inc_and_test(atomic_t *v) { return atomic_add_return(1, v) == 0; @@ -153,6 +155,11 @@ static inline void atomic_dec(atomic_t *v) atomic_sub(1, v); } +static inline int atomic_dec_return(atomic_t *v) +{ + return atomic_sub_return(1, v); +} + static inline int atomic_dec_and_test(atomic_t *v) { return atomic_sub_return(1, v) == 0; -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |